[php-maint] Timezone querying

Filipus Klutiero chealer at gmail.com
Thu Mar 18 16:05:28 UTC 2010

Le mars 17, 2010 07:46:29 PM, Raphael Geissert a écrit :
> On 17 March 2010 14:17, Filipus Klutiero <chealer at gmail.com> wrote:
> > Sean, let's do that. I'll recap what I wrote in my 3 last mails.
> >
> > Hi all,
> > at the end of February, PHP 5.3 came to me, with an expected number of issues. One issue that annoyed me was that a warning is now triggered if a time-related function is used without having set the timezone in 3 approved ways: the TZ environment variable, the date.timezone PHP directive or calling date_default_timezone_set(). Thankfully, Sean Finney made Debian's PHP quiet this warning - so PHP now relies on the system timezone (PHP was already able to use that as a last recourse, but considered it unreliable, for an obscure reason).
> >
> That actually needs to be fixed, because the results are actually
> incorrect (in spite of the tz foo patch):
> $ cat /etc/timezone
> America/Mexico_City
> $ php -nr 'var_dump(date_default_timezone_get());'
> string(15) "America/Chicago"

That is the same thing as we discussed in the first messages on #571762

>We selected 'America/New_York'
>for 'EST/-5.0/no DST' instead in /var/www/tiki/test.php on line 4

It works, but it's not clean.

More information about the pkg-php-maint mailing list