Re:How to save datetimes for future events
by protomyth on Monday March 23, 2015 @03:56PM
(#9253010)
"My point was that you are always calculating it dynamically."
My point is that you aren't. Location -> Time Zone -> Offset is something that only has to be updated infrequently. The results are then stored in a temp or work table (whatever optimizes better). Now I have a table with (Location, Local Event Time) which I can do a range on the offset query to get the Local Times. I would write the schema and queries, but this depends on which database you use. I've done this on Sybase 12.5 and it worked just fine.
"But even then the ambiguity of which timezone to actually apply remains as mentioned in other comments."
My point is that you aren't. Location -> Time Zone -> Offset is something that only has to be updated infrequently. The results are then stored in a temp or work table (whatever optimizes better). Now I have a table with (Location, Local Event Time) which I can do a range on the offset query to get the Local Times. I would write the schema and queries, but this depends on which database you use. I've done this on Sybase 12.5 and it worked just fine.
"But even then the ambiguity of which timezone to actually apply remains as mentioned in other comments."
No, I have the wanted local time at a location.