[Bug 1069529] Re: Regression in system fallback for date_default_timezone_get()

Marc Deslauriers marc.deslauriers at canonical.com
Wed Nov 7 21:31:23 UTC 2012


ACK on the debdiff. I've uploaded a slightly modified version of it to
raring, and to quantal-proposed for processing by the SRU team. Thanks!

** Changed in: php5 (Ubuntu Raring)
       Status: Triaged => Fix Committed

-- 
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:
  Fix Committed
Status in “php5” source package in Quantal:
  Triaged
Status in “php5” source package in Raring:
  Fix Committed
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