[TYPO3-dev] Time issues - a proposal

Steffen Kamper steffen at sk-typo3.de
Sat Oct 27 13:32:36 CEST 2007


"Martin Kutschker" <martin.kutschker-n0spam at no5pam-blackbox.net> schrieb im 
Newsbeitrag 
news:mailman.1.1193434734.16718.typo3-dev at lists.netfielders.de...
> Hi!
>
> I want to introduce a new variable to be used for access control. It drops 
> the seconds from the current time as access control doesn't use seconds. 
> The point is to give Mysql the chance to cache the query, which is nearly 
> impossible with clauses like "endtime > $GLOBALS['SIM_EXEC_TIME']".
>
> $ACCESS_TIME = $EXEC_TIME - ($EXEC_TIME % 60);
> $SIM_ACCESS_TIME = $SIM_ACCESS_TIME;
>
> And I want a new option to store all timestamps in UTC/GMT. Therefor 
> t3lib_div gets two new functions.
>
> function getTime() {
> if ($GLOBALS['TYPO3_CONF_VAR']['SYS']['useUTC']) {
> $time = gmtime();
> } else {
> $time = time();
> }
> }
>
> function makeTime() {
> $args = func_get_args();
>
> if ($GLOBALS['TYPO3_CONF_VAR']['SYS']['useUTC']) {
> return call_user_func_array('gmmktime', $args);
> } else {
> return call_user_func_array('mktime', $args);
> }
> }
>
> Masi

absolute +1

vg Steffen 






More information about the TYPO3-dev mailing list