This paper investigates the time-local discretization, using Gaussian quadrature, of a class of diffusive operators that includes fractional operators, for application in fractional differential equations and related eigenvalue problems. A discretization based on the Gauss-Legendre quadrature rule is analyzed both theoretically and numerically. Numerical comparisons with both optimization-based and quadrature-based methods highlight its applicability. In addition, it is shown, on the example of a fractional delay differential equation, that quadrature-based discretization methods are spectrally correct, i.e. that they yield an unpolluted and convergent approximation of the essential spectrum linked to the fractional derivative, by contrast with optimization-based methods that can yield polluted spectra whose convergence is difficult to assess.