bluesmoon – Handling Date/Times and timezones

  • Always store time in UTC
  • Convert to local time on display (local being defined by the user looking at the data)
  • When storing a timezone, you need the name, timestamp and the offset. This is required because governments sometimes change the meanings of their timezones (eg: the US govt changed DST dates), and your application needs to handle things gracefully… eg: The exact timestamp when episodes of LOST showed both before and after DST rules changed.

via bluesmoon – Handling Date/Times and timezones. The three basic rules of storing date/times in a web application.

Comments

Leave a Reply

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