You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notice that all the functionality in Timex for conversion from UTC time to a specific timezone time seem to have the possibility of returning an ambiguous datetime (Timex.AmbiguousDateTime).
I am no expert on timezones, but I would have thought that going from UTC to a local time is always unambiguous (it is going the other way from local time to UTC that may be ambiguous, e.g. with DST). I.e. at a specific point in time, a given timezone has exactly 1 associated local time. Evidently this is not the case though? I'm wondering if anyone could shed some light as to why this is so.
I have seen the 2 cases of ambiguity in the Timex.AmbiguousDateTime docs, but I'm unsure if they apply here.
Case 1 definitely does not apply (this concerns going from local time to UTC).
Case 2 seems like it might be the reason, but I don't understand how "more than one zone applies to a given date and time" if we have already specified and fixed the timezone. If we say the timezone is Asia/Taipei, surely this leaves no room for ambiguity?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I notice that all the functionality in Timex for conversion from UTC time to a specific timezone time seem to have the possibility of returning an ambiguous datetime (
Timex.AmbiguousDateTime
).I am no expert on timezones, but I would have thought that going from UTC to a local time is always unambiguous (it is going the other way from local time to UTC that may be ambiguous, e.g. with DST). I.e. at a specific point in time, a given timezone has exactly 1 associated local time. Evidently this is not the case though? I'm wondering if anyone could shed some light as to why this is so.
I have seen the 2 cases of ambiguity in the
Timex.AmbiguousDateTime
docs, but I'm unsure if they apply here.Case 1 definitely does not apply (this concerns going from local time to UTC).
Case 2 seems like it might be the reason, but I don't understand how "more than one zone applies to a given date and time" if we have already specified and fixed the timezone. If we say the timezone is Asia/Taipei, surely this leaves no room for ambiguity?
Beta Was this translation helpful? Give feedback.
All reactions