[TYPO3-core] Alternative patch to RFC #11587: PHP Warnings concerning missing timezone settings under PHP 5.3

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Nov 5 18:09:08 CET 2009


Martin Kutschker schrieb:

>>> And furthermore I suggest to remove the unused "serverTimeZone" (or to reuse it for the new
>>> setting). Having two settings so close at each other with one being non-functional will be confusing.
>> Difficult topic (the holy cow), but serverTimeZone was meant for
>> frontend extensions to add / substract an "offset" to all times for
>> display purposes.
> 
> Then it should be in FE not in SYS.

Ok, gotme. Maybe backend modules might also be using it? :)

>> Sure this setting is kind of "lame" and old-school but
>> it might have already been used for that purpose, so I wouldn't
>> recommend misusing it.
> 
> I see no misuse when we use "serverTimeZone" to set the servers time zone.
> 
> The original usage is even broken as the offset must be in minutes not hours.

Exactly, we should better remove the old "serverTimeZone" setting (or
mark it as deprecated), because no useful information was stored there.
There might be installations where this is set to "2" or "3", and that
would break all "date()" if we just "use it" for our
date_default_timezone_set() call.

>> Instead the new setting which makes it clear what it makes (affects
>> date() calls in PHP) and also that it doesn't make any "magic" which one
>> might be mislead into thinking if it is called "serverTimeZone".

> A matter of taste, but I don't insist.

Ok. See if v6 of the patch makes sense to you.

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list