[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 14:21:47 CET 2009


Dmitry Dulepov schrieb:
> Here is the alternative patch that implements algorithm mentioned below.
> 
> Dmitry Dulepov wrote:
>> Proper algorithm:
>> - Is "force" setting empty?
>>  |- "no" -> set it. The end
>>  |- "yes" -> Is ini_get('date.timezone') value empty?
>>              |-> "yes" set "default" setting. The end
>>              |-> "no" Nothing to do. The end.
> 

I think two settigs is misleading to the admin. I prefer only one
setting, and have a default (that is not configurable) e.g. "UTC" (which
is the PHP default).

If one wants to set it, he can either set in php.ini or in the
"phpTimeZone" TYPO3 setting.

So easier algorithm:

Is date_default_timezone_get() empty?
    |-> "yes" set "UTC"  (like PHP <5.3 did)
    |-> "no" set to "phpTimeZone" (or "UTC" if also empty)

And then ship with "phpTimeZone=''" so the user can either force it by
setting or leave it empty (in which case PHP defaults apply).

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list