[TYPO3-dev] Time issues - a proposal
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Sat Oct 27 11:10:36 CEST 2007
Here's a proposal I sent on typo3.dev:
Martin Kutschker schrieb:
>
> 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);
> }
> }
The idea is that TYPO3 runs either backwards compatible with local time
or in UTC for new installations.
The Core and all compliant extensions MUST use these two new functions
so that timestamps are generated in a consistent way across the system.
Masi
More information about the TYPO3-dev
mailing list