slides/time/in-database1.xml
Storing date/time in a database
20/26
Periods
Storing date/time in a database
  • • Goal: Store date exactly 4 months in the future
  • • Store: timestamp and UTC offset (UTC-4)
  • • Current date/time: Jun 1st, 13:00 UTC-4 (1338570000)
  • • Future date/time: Oct 1st, 13:00 UTC-4 (1349110800)
  • • Correct for Montreal, where DST is still in effect.
  • • Wrong for Santiago, where it DST has kicked in so it's UTC-3.
  • • Conclusion: By storing timestamp and UTC offset you can't convert back to local time