PEAR DATE DAYLIGHT SAVING BUGS

The clocks went forward in the UK last night and fortunately I was working on a site today which involved manipulating dates and times between timezones so I immediately noticed a problem in PEAR Date that I have been using without problems until now.

When converting between time zones UTC and  Europe/London there was no change in the date/time value. As we’re now into British Summer Time (BST), Europe/London should show as 1 hour greater than UTC (which incidentally is the same as GMT), so it seems like PEAR Date has a bug relating to daylight saving in the UK in 2011.

Looks like there’s a better way to handle time zones than using PEAR Date now anyway. I’ll write a quick post about using the DateTime class introduced in PHP 5.2 soon.

Update: Time Zone Conversion using PHP DateTime Class

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">