Info ~ travel musings for the masses

I have been looking into how to deal with timezones in PHP and daylight savings. From what I have been able to find, daylight savings in the U.S. takes place from April through October. The only states that do not observe daylight savings are Alaska, Arizona, Hawaii, and Indiana.

To write internationally compliant code I have decided to just include a checkbox that says “Does your local area observe daylight savings?” and if it does have the code during the daylight savings months subtract another hour from the time. This allows the code to be used pretty much anywhere in the world. The only thing I need to look into more is if there is anywhere in the world that falls back two hours. I do not think there is anywhere like that but I need to double check.


No comments yet.

Leave a Reply

Basic HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS

This site uses Akismet to reduce spam. Learn how your comment data is processed.