News for hackers. Stuff that matters.
Re:Storing Date/Times in Databases by ars on Monday May 14, 2012 @04:09AM (#3970003)
That's why I always distinguish two types of times: A point in time, and the name of a time.

A point in time should be stored as a timestamp (unixtime) and converted to local at the point of presentation.

A name of a time should be stored as a datetime column with no timezone and should not be adjusted by timezone.

The hard part is when you combine them: You have a name of a time (an appointment) and you want to correlate that with a point in time to match with someone else's calendar. The only way to do that is store the datetime plus the name of the timezone area (not the offset, the name).

Re:Storing Date/Times in Databases by URSpider94 on Monday May 14, 2012 @04:31AM (#3970042)
The author's point is that even that is not enough, if the rules of the timezone change between when you enter the event into the database and when the event arrives.