bluesmoon – Handling Date/Times and timezones

  • Always store time in UTC
  • Con­vert to local time on dis­play (local being defined by the user look­ing at the data)
  • When stor­ing a time­zone, you need the name, time­stamp and the off­set. This is required because gov­ern­ments some­times change the mean­ings of their time­zones (eg: the US govt changed DST dates), and your appli­ca­tion needs to han­dle things grace­fully… eg: The exact time­stamp when episodes of LOST showed both before and after DST rules changed.

via blues­moon – Han­dling Date/Times and time­zones. The three basic rules of stor­ing date/times in a web application.

Comments are disabled for this post