-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Hi Justin!
I am Almaz, I do time zone updates on Android. Just a few thoughts:
There is no such thing as a canonical time zone ID according to IANA [1]. So "canonical in Firefox (from IANA)"
and "IANA Canonicalization" mentioned in [2] are not really accurate.
From a practical perspective I agree that it is better to not do any sort of canonicalizations or links following in
the factory methods as their behaviour should be identical modulo actual Olson ID used there, which
unfortunately might be exposed in a string representation of a date/time object.
Also, as it takes a while for real world devices to receive the latest TZDB release, using the "newest" ID
as Firefox does might not be safe as it can be treated as invalid on the receiving side.
Equality is tricky: according to IANA relationship between Asia/Kolkata and Asia/Calcutta [3] is the same as
Europe/Berlin and Europe/Oslo [4]. Will Temporal.TimeZone.from('Europe/Berlin').equals('Europe/Oslo');
return true
? If yes, won't it be surprising for developers? If not, how equality will be defined?
Thanks,
Almaz
[1] https://mm.icann.org/pipermail/tz/2022-August/031889.html
[2] https://github.com/justingrant/proposal-canonical-tz/blob/main/README.md
[3] https://github.com/eggert/tz/blob/c759f632702b2db2645f733e3574469fc20ee9c3/backward#L301
[4] https://github.com/eggert/tz/blob/c759f632702b2db2645f733e3574469fc20ee9c3/backward#L231