News for hackers. Stuff that matters.
Re:Dealing with Timezones in Python by fanf2 on Sunday July 17, 2011 @06:50AM (#2773045)
Local time + timezone is not enough, because timezones change. For time in the past, including measurements of the current time, store something equivalent to UTC, e.g. time_t or ISO 8601. For times in the future, store local time and location, and do the location -> timezone lookup at rum time. Add an earlier/later disambiguation bit to deal with DST transitions and other ambiguities. Sadly no-one does it this way which is why you have problems like needing to fix all the copies of the TZ information in your Exchange server when TZ rules change. Because of this, the location to TZ database is an exercise for the reader...

http://fanf.livejournal.com/104586.html

There are no comments on this comment yet.