[TYPO3-core] RFC #11430: Use $_SERVER['REQUEST_TIME'] instead of time() where it makes sense

Niels Pardon mail at niels-pardon.de
Sun Jun 28 20:31:22 CEST 2009


Hi Stucki!

I took your comments into account and created a new patch.

I agree with you that using $GLOBALS['EXEC_TIME'] is better here. I'd
even say that using $GLOBALS['SIM_EXEC_TIME'] has to be another RFC as
it may change the behavior of some parts of the core.

So I changed all of my changes to $GLOBALS['EXEC_TIME'] and added the
fall-back you requested to t3lib/config_default.php.

Greets,

Niels



Michael Stucki schrieb:
> Hi Niels,
> 
> I did not yet test your patch but have two comments already:
> 
> 1. SIM_EXEC_TIME is used for simulating a different time, e.g. in  the
> Frontend using the admin panel (preview => simulate time...). I do not
> think that there is a use of overriding this time key within the
> backend, however in case that it ever might happen, I would recommend
> using EXEC_TIME instead, which is the original time. For everything
> except the frontend rendering, I would say that this is always the value
> which we expect to get here.
> 
> 2. Please add a fallback in case $_SERVER['REQUEST_TIME'] is not set
> (just fall back to time()).
> 
> - michael


More information about the TYPO3-team-core mailing list