News for hackers. Stuff that matters.
Re:UTC Is Enough for Everyone, Right? by mikekchar on Tuesday May 29, 2018 @08:27PM (#17183890)
When we were building a golf tee time web site we eventually decided on this as well: always store the date-time as a string in the timezone local to the event. Convert to a date-time object in whatever timezone the user prefers (or golf tee time service APIs prefer :-P) on demand.

There is still a caveat, though. Locations can change timezone. Sometimes they do it fairly often (like every few years). You need access to a good timezone/location database that is updated regularly :-(

When we were doing this project, I was really surprised at how often we got problems. If you sell things all over the world (there are golf courses in ridiculous places), the probability that you will stumble into an anomaly is surprisingly high. Alas, this project was not a commercial success as the margins on tee times are quite small (and the tee time services you have to work with are often quite badly written). But it was quite fun to work on.

Re:UTC Is Enough for Everyone, Right? by stouset on Tuesday May 29, 2018 @08:38PM (#17183963)
So to be absolutely correct, you store future timestamps in localtime, along with GPS coordinates of the location for the event. Then you determine the time zone of the physical locale based on a GIS lookup. Then when rendering, you offset that against the timezone of the user’s current location. I think.

I hate time.

Re:UTC Is Enough for Everyone, Right? by mikekchar on Tuesday May 29, 2018 @09:34PM (#17184313)
Yep. That's exactly what we did :-) For the short time we were running the service (about a year or so) it worked great ;-)