  We present a detailed analysis of the influence of the environment and of the
environmental history on quenching star formation in central and satellite
galaxies in the local Universe. We take advantage of publicly available galaxy
catalogues obtained from applying a galaxy formation model to the Millennium
simulation. In addition to halo mass, we consider the local density of galaxies
within various fixed scales. Comparing our model predictions to observational
data (SDSS), we demonstrate that the models are failing to reproduce the
observed density dependence of the quiescent galaxy fraction in several
aspects: for most of the stellar mass ranges and densities explored, models
cannot reproduce the observed similar behaviour of centrals and satellites,
they slightly under-estimate the quiescent fraction of centrals and
significantly over-estimate that of satellites. We show that in the models, the
density dependence of the quiescent central galaxies is caused by a fraction of
"backsplash" centrals which have been satellites in the past (and were thus
suffering from environmental processes). Turning to satellite galaxies, the
density dependence of their quiescent fractions reflects a dependence on the
time spent orbiting within a parent halo of a particular mass, correlating
strongly with halo mass and distance from the halo centre. Comparisons with
observational estimates suggest relatively long gas consumption time scales of
roughly 5 Gyr in low mass satellite galaxies. The quenching time scales
decrease with increasing satellite stellar mass. Overall, a change in modelling
both internal processes (star formation and feedback) and environmental
processes (e.g. making them dependent on dynamical friction time-scales and
preventing the re-accretion of gas onto backsplash galaxies) is required for
improving currently used galaxy formation models.
