-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for deprecated timezone names? #44
Comments
Hi there, thanks for the well-detailed issue. I am reluctant on doing manual changes to the time zones because I fear the changes would be no more valid at some point. The files are generated for now. There's one place where we do manual manipulation of data: Line 182 in da39b58
Still, we can try to find a way to solve your issue, I see two ways:
Let me know what you think! |
I am also reluctant to handle this manually. I am building an app that may be used by users from any time zone and my goal is a good out-of-the-box experience. People also generally won't file issues for their time zone with me simply because they might not be technical users. I could not find a clearly laid out data for this in the geonames.org dump -- though I'm sure I see some wildly linked data there which does signal old names of cities, if not timezones. Either way, I don't think that helps. The second repository you linked to however has this data in its global tzdata file (but not continent specific tzdata files):
I could not find the key under which this falls. It doesn't appear to be under its own key, in fact. Given that, I am not sure how we could programmatically extract this piece of data from the whole file. Do you think this is something we can move forward with? |
I think we're on the right path, using this file we could:
Let me know how it goes! You can run the generate.js script locally (use latest Node v14) and see what are the changes. Thanks |
I will attempt it next week and let you know how it goes. 👍 |
Fyi for people looking for a dump of alternative names, I scraped Wikipedia page of https://en.wikipedia.org/wiki/List_of_tz_database_time_zones Using this script
Here's the snapshot of output: https://gist.github.com/steelbrain/f1548e51d8d1e231d81b8609c6140f95 |
Would love to have this built in, or perhaps an option on the constructor to include deprecated names or not? |
I made a comment here in #153 about how a list of deprecated time zones could be downloaded directly from the source, IANA Time Zone Database. |
🎉 This issue has been resolved in version 6.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
So stoked to see this come out! 🎉 Sorry I couldn't help more, @vvo. 😔 |
@hirusi Oh, you helped a lot already by opening the issue and adding comments on how to do it just like @KevinNovak helped also. The thing is, unless I have a similar problem in production, I usually don't do new features and let people do them instead. But this time I had the issue so I fixed it :) |
I live in a time zone which has a deprecated name,
Asia/Calcutta
, the newer one beingAsia/Kolkata
.While Firefox correctly reports
Asia/Kolkata
using the Internationalization API, Chromium based browsers do not:On Chromium:
Asia/Calcutta
On Firefox:
Asia/Kolkata
There is a pending issue on the Chromium bug tracker 580195. Another issue 962806 was marked as duplicate, merged into 645807, which was ultimately closed without fixing this timezone.
The ideal scenario is that the Chromium team fixes this, of course. The issue has been open since January 2016 for Asia/Kolkata, and for better spec compliance in general since August 2018. At the moment, we do not know for certain how many timezones are affected with a similar bug -- which is why I come here with this request.
In the interim, is adding support for perhaps another key in the timeZone object, such as,
backzones
or whatever you see fit -- to include older names of the timezones something you would consider? Then developers are able to match with the backzones and use the matching canonical names for that backzone while saving to database.Just as a quick example from the readme:
The text was updated successfully, but these errors were encountered: