|
|
|
|
|
by mumblerino
2101 days ago
|
|
Can’t most of these issues be solved by not using timezones at all on servers? All data should be UTC; timezones only apply when the data is shown to the user, possibly on the client itself, which likely can automatically display the right time for a UTC date. |
|
UTC time probably won't always give you the correct result, since timezones and DST aren't fixed.
Say, you want to store the time of your doctor's appointment months in advance.
Here it makes sense to store the time with a timezone - but not the timezone offset. This makes sense because no matter what the government decides about changing DST or moving timezone offsets alltogether - your doctor's appointment is going to be at 0900am at a specific geographic location and since you will physically be there with your watch synchronized to your doctor's.
But say you have an online appointment with your psychotherapist who lives in a completely different timezone (possibly you do not know which one) from you at some specific time in the future.
Here making the appointment via UTC makes sense - to meet up you need a globally synchronized clock.
The hard part: how do you know determine whether you can schedule these two one-hour appointments right after each other and not have a conflict ? I am not sure it's perfectly possible.