[php-maint] Bug#730771: Regression in system fallback for date_default_timezone_get()

Robie Basak robie.basak at ubuntu.com
Fri Nov 29 12:30:19 UTC 2013

Package: php5-cli
Version: 5.5.6+dfsg-1
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu trusty

Steps to reproduce:

1. Set a timezone other than UTC using "dpkg-reconfigure tzdata".
2. $ php -r 'echo date_default_timezone_get()."\n";'

Expected results: system timezone (eg. "Europe/London")

Actual results:

PHP Warning:  date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Command line code on line 1

This is a regression from wheezy.

Some background:

Justification for patching in system timezone:

Previous regression in Ubuntu (merged in the window when Debian was
regressed in unstable, but never released):

Current regression in Ubuntu, which also applies to Debian sid:

I guess the previous patch needs to be ported forward to 5.5?



More information about the pkg-php-maint mailing list