Event Times
Date: 03/11/09
(Computer Geeks) Keywords: no keywords
I'm solving a problem. One of the features I'm working on right now is an event calendar. The cool part is that people can enter events on a shared calendar. So, for example, there might be a calendar for parties and anyone can put an event on it if they're having a party.
But people are all over the world. This plays havoc with date/time storage. I know the timezone of every user, so I can take their local time and convert it to UTC for storage. I can even convert back from UTC to the local time of the viewing user. But this makes no real sense, does it? Consider:
Events happen at a location. The start time of that event is the start time local to that location. All events really should be displaying such as, "October 12, 2010 at 6:00PM in New York," as that is completely sufficient for someone to know where something is happening and when. This means that I don't need to store the start time of the event as UTC nor do I need to worry about the time zone of the person posting the event or the person viewing it. I store the time as given.
This also means I don't have to worry about Daylight Savings Time, which is just a HUGE pain in the ass. The only other solution that can convert back to "time where the event is" is to store the time zone along with the event. Many users won't know this, many will get it wrong, or just leave it out altogether.
Am I missing the obvious? Or does this make sense?
Source: http://community.livejournal.com/computergeeks/1248143.html