php5 using bundled tzdata in hardy?

Bug #279980 reported by Jeff Waugh on 2008-10-08
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Undecided
Unassigned
Hardy
Undecided
Unassigned

Bug Description

Binary package hint: php5

Seems like php5 in hardy has bundled, and now out-of-date, tzdata. Sydney just hit DST this weekend (October 5), but php5 seems to think it will happen on the old date of October 26. I have attached a script that provides this output.

Jeff Waugh (jdub) wrote :
Jeff Waugh (jdub) wrote :

I blogged a quick workaround for people suffering this bug:

    http://bethesignal.org/blog/2008/10/08/php5-daylight-saving-dst-timezone-tzdata-ubuntu-hardy-lts/

(php5-timezonedb was synced and then removed from intrepid, largely because it seems that intrepid's php5 includes a patch to support using the system tzdata... would be awesome to get that patch into hardy!)

Paul McGarry (paul-paulmcgarry) wrote :

This also effects 6.06 LTS.

Although we're getting close to the date that the timezone will be correct again using the old rules, this should still be fixed because the problem will happen again in subsequent years within the two LTS releases EOL dates.

Juan F. Codagnone (jcodagnone) wrote :

this issue also affect Argentina that also hit DST this Sunday (October 19).

related: https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/278419

MarianoAbsatz (el-baby) wrote :

Is there a reason for PHP running in linux to use its own version of the tz database?

Chuck Short (zulcss) wrote :

Hi Jeff,

Can you try the version in my ppa?

Thanks
chuck

Changed in php5:
status: New → Incomplete
Jeff Waugh (jdub) wrote :

Hi Chuck,

Just tried with php5-cli from your PPA, and it doesn't seem to work:

jdub@hardy:~$ php5 php5-timezone.php
time(): 1210669875
change: 1224950400
October 26, 2008 @ 3:00 am EST

(Should say October 5.)

Thanks!

Jeff Waugh (jdub) wrote :

Looks like you added the patch, but didn't add --with-system-tzdata to rules. :-)

Chuck Short (zulcss) wrote :

So I did.

Ive added it to the version that is going into proposed.

php ships its own tzdata file, however this is not regularily in Ubuntu. I have added the patch and debian/rules change which uses the system timezone data. I dont expect to be any regressions with this since we are using this in intrepid already.

Steps to reproduce:

1. Run the script that jeff attached.

I have attached the debdiff that fixes this issue. If you have any questions please let me know.

Regards
chuck

Jeff Waugh (jdub) wrote :

"Nailed it!" :-)

jdub@hardy:~$ php5 --version
PHP 5.2.4-2ubuntu5.4 with Suhosin-Patch 0.9.6.2 (cli) (built: Nov 22 2008 15:51:10)

jdub@hardy:~$ php5 php5-timezone.php
time(): 1210669875
change: 1223136000
October 5, 2008 @ 3:00 am EST

Thanks heaps, Chuck!

Martin Pitt (pitti) wrote :

Allegedly fixed in intrepid and jaunty.

Changed in php5:
status: Incomplete → Fix Released
Martin Pitt (pitti) wrote :

Accepted into hardy-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in php5:
status: New → Fix Committed
Jeff Waugh (jdub) wrote :

Confirming that the hardy-proposed build works as advertised, and does not appear to have caused other problems (running it on a production server).

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package php5 - 5.2.4-2ubuntu5.4

---------------
php5 (5.2.4-2ubuntu5.4) hardy-proposed; urgency=low

  * debian/rules:
    - Use system tzdata.
  * debian/patches/use_embedded_timezonedb.patch
    - Patch taken from intrepid, allows us to default to using the system
      provided timezone database insteam of the one bundled with PHP.
      (LP: #279980)
  * debian/patches/fix-xmlrpc-datetime.diff
    - Patch taken from php CVS, prevents stack smashing when using xmlrpc and datetime.
      (LP: #239513)

 -- Chuck Short <email address hidden> Wed, 22 Oct 2008 13:08:33 +0000

Changed in php5:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers