|
|
|
|
|
by bob1029
1958 days ago
|
|
We do have one case where we do have to capture the hour of day for an IT activity. In this situation, we present the UI in the timezone configured by the customer's server and additionally display this timezone information in the UI as reference/confirmation for the user. Once the user submits their input in terms of server-local time, we immediately convert it to UTC for storage in our system. Note that because we present the actual TZ info, this even supports servers that are already configured for UTC. We have no edge cases aside from ensuring our users pay attention to the TZ info. I still don't understand the arguments about a future date requiring a timezone. UTC can 100% accurately represent a future date or event without any ambiguity. If a user, meeting or other aggregate has a culture/timezone preference, this is a completely separate business fact from the time. |
|
A future event at local time requires a location, because the timezone may yet change at that location. Suppose we meet Nov 1st 2017 in Istanbul and decide to repeat this the year after. We agree to meet again Nov 1st 2018 in Istanbul 10:00 local time. This meeting would have been projected to happen at UTC 8:00, because Turkey was scheduled to switch to UTC+2 on October 30 2018.
However, the government decided to not change the timezone and stay on UTC+3. So our meeting, being scheduled for 10:00 local time, would move from UTC 8:00 to UTC 7:00 at the stroke of a pen. If your software had recorded UTC time, it would be ignorant of this change and consequently it would show the meeting at 11:00 local time. You'd be one hour late.
This change in the tz DB is a little window into the questionable cultural achievement that is local time: https://github.com/eggert/tz/commit/e15ef79a603a2fba89ad8f38...