You are hereBlogs / dave's blog / Drupal Doesn't Work with Daylight Savings Time

Drupal Doesn't Work with Daylight Savings Time


By dave - Posted on 18 March 2009

clock iconA client emailed me saying his Drupal site wasn't adjusting for Daylight Savings Time. This seemed odd since Drupal has a lot of the contributors in the US and Europe, and the project usually pretty good with cross-country issues such as time zones.

After finding a lengthy discussion of applying different time zones to events and a short patch with instructions for applying DST for US users, I finally stumbled upon a post from September 2004 notes that "this isn't all that hard to do" However, the thread degenerates into a lot of bug fixes:

The patch looks good... however, it doesn't take into account the fact that in Australia, DST starts and ends at 2am on Sunday morning

...and pleas:

This is an incredibly useful feature and I would like to see it incorporated into the next release (current release is 4.6.0).

...and later, a measure of resignation:

...the updated list will just have to wait until Drupal 8.

My solution? Adjust the time manually from GMT-8 to GMT-7, which moves the displayed dates from Pacific Standard Time to Pacific Daylight Time. Not perfect, but good enough until there's an official contribution.

Tags

About the Author

dave's picture

Name
Dave Nugent

Bio

Dave is a freelance Drupal developer working in San Francisco. He runs the San Francisco JavaScript Meetup and GamesJS, an HTML5 gaming group. He's a graduate of CMU Silicon Valley. In his spare time he docents at the Computer History Museum and serves on the board of the Digital Game Museum. Follow Dave on Twitter @drnugent.