[Bug 1069529] Re: Regression in system fallback for date_default_timezone_get()
Robie Basak
1069529 at bugs.launchpad.net
Wed Oct 24 13:35:49 UTC 2012
SRU debdiff attached. AIUI, this can be copied forward to raring.
** Description changed:
- An upstream change in PHP requires php.ini to have the timezone set in
- there, instead of PHP using the system timezone as one might expect.
+ [Impact]
- This is new in PHP 5.4.
+ 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:
+ [Test Case]
- Run:
- $ php -r 'echo date_default_timezone_get()."\n";'
+ 1. Set a timezone other than UTC using "dpkg reconfigure tzdata".
+ 2. $ php -r 'echo date_default_timezone_get()."\n";'
- Expected results: timezone (eg. "Europe/London")
+ 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.
** Patch added: "fix-system-timezone.debdiff"
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1069529/+attachment/3411708/+files/fix-system-timezone.debdiff
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in Ubuntu.
https://bugs.launchpad.net/bugs/1069529
Title:
Regression in system fallback for date_default_timezone_get()
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1069529/+subscriptions
More information about the Ubuntu-server-bugs
mailing list