Regression in system fallback for date_default_timezone_get()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php5 (Debian) |
Fix Released
|
Unknown
|
|||
php5 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Quantal |
Fix Released
|
Medium
|
Unassigned | ||
Raring |
Fix Released
|
Medium
|
Unassigned |
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/
[Test Case]
1. Set a timezone other than UTC using "dpkg reconfigure tzdata".
2. $ php -r 'echo date_default_
Expected results: system timezone (eg. "Europe/London")
Actual results:
PHP Warning: date_default_
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.
description: | updated |
summary: |
- date_default_timezone_get() broken after upgrade to 12.10 + php packaging does not automatically set timezone in php.ini |
Changed in php5 (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
description: | updated |
information type: | Public → Public Security |
information type: | Public Security → Public |
Changed in php5 (Debian): | |
status: | Unknown → Fix Released |
Changed in php5 (Ubuntu Quantal): | |
status: | New → Triaged |
importance: | Undecided → Medium |
I believe that the php5 source package in Ubuntu (Debian) tries to make sure that in Ubuntu this is not necessary (I see patches related to using . Therefor I assume something is broken in those patches, and I reassign to php5. If somebody with more php knowledge could look into this...
Cacti just relies on php returning the proper timezone. If php can not do that, Cacti will also not be able to do that better.