[Bug 1069529] Re: Regression in system fallback for date_default_timezone_get()
Marc Deslauriers
marc.deslauriers at canonical.com
Wed Nov 7 15:34:00 UTC 2012
** Also affects: php5 (Ubuntu Raring)
Importance: Medium
Status: Triaged
** Changed in: php5 (Ubuntu Quantal)
Status: New => Triaged
** Changed in: php5 (Ubuntu Quantal)
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1069529
Title:
Regression in system fallback for date_default_timezone_get()
Status in “php5” package in Ubuntu:
Triaged
Status in “php5” source package in Quantal:
Triaged
Status in “php5” source package in Raring:
Triaged
Status in “php5” package in Debian:
Fix Released
Bug description:
[Impact]
A regression of timezone handling between Precise and Quantal means
that PHP scripts that depend on the system timezone now use UTC
instead. This breaks arbitrary PHP scripts - eg. cactus stops working
as expected.
Not affected: 5.3.10-1ubuntu3.4 (Precise)
Affected: 5.4.6-1ubuntu1 (Quantal)
Not affected: 5.4.4-7 (sid)
Workaround: edit /etc/php5/*/php.ini, uncomment the "date.timezone"
line and set it to what you need.
[Test Case]
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
UTC
(where in this case UTC is the system timezone).
[Regression Potential]
This patch was previously used by Debian and inadvertently dropped,
causing this regression. It has already been re-added in Debian. The
change only touches the guess_timezone function and adds an additional
fallback. If there is an inadvertent regression, it is likely to be in
timezone selection code.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1069529/+subscriptions
More information about the Ubuntu-sponsors
mailing list