[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 15:35:18 CET 2009


Martin Kutschker schrieb:
> Ernesto Baschny [cron IT] schrieb:
>> Dmitry Dulepov schrieb:
>>> Hi!
>>>
>>> Ernesto Baschny [cron IT] wrote:
>>>> I don't see why users should complain about the setting. If someone sets
>>>> it in PHP, it works (leave it empty in TYPO3) if someone cannot set it
>>>> in PHP.ini or wants to override it in TYPO3, use the single setting. So
>>>> why add the complexity for users to understand two setting for this?
>>> I do not object :) I wanted to provide more flexibility but you got a fair point too. You solution more simple. May be we should use it instead of mine.
> 
> The patches uses "phpTimeZone" and "phpTimeZoneForce". I suggest the simple "timeZone". The PHP adds
> nothing to the meaning.

Ups, yes, my patch is buggy, is should have been phpTimeZone on both
places. Attached fixed patch.

> 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. 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.

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".

>> Here is a trunk patch with that algorithm in place and also a TYPO3-4_2
>> variant with no new setting, but avoiding the warnings by setting the
>> "default" if none is found.

> This one looks good: +1 by reading.

Cheers,
Ernesto

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 11587-v4.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20091105/b61e9741/attachment-0001.asc>


More information about the TYPO3-team-core mailing list