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
A simple list of time zones. #499
Comments
Yes, there are lots of folks that could benefit from a simplified list of time zones for time zone selection purposes. However, a few things:
Ideally, one would never pick "America/Los_Angeles", but would instead pick "Pacific Time", after first picking "United States". But even then, there's the problem of localization. How do I get "Pacific Time" in English but "heure du Pacifique" in French? That's another place where CLDR comes in. However, even then they aren't specific enough, because "Mountain Time" could mean And there are even more edge cases.... I've already tackled this from a .NET perspective, with my TimeZoneNames library. There's even a demo you can try out here that shows how a threshold date can be used to apply the type of context I spoke of earlier. You're welcome to rip off any of my code. What's probably needed is a pure JavaScript version of this. I'll work on that some other time, or maybe someone else will beat me to it. :) Anyway, it can't go here because we would need all of the localized time zone names from CLDR, which would make the size of this library huge. There is some work started in PR #175 that would at least let you limit by country, but it needs some revision before it can be merged. In the meantime, the best we can offer is |
Is there any way to get a simplified list of time zones currently? I'm looking for a simplified list similar to this one: https://gist.github.com/alfonmga/0e460fe8cbebce1e2015bad1e93f07b7 I'm not sure at all how I could achieve a similar result using Moment Timezone. |
Hey, I recently struggled with that too while willing to build a Google calendar like time zone selector: Google calendar has 352 time zones (June 2020) and I believe they are mostly all necessary (you can't fail time zones when building a calendar). But still way less than 520. Grouping of time zones is tricky, you don't want to group time zones solely based on their offset being the same, you have to consider the country and dst too. And on top of that ensure you're always up to date. To solve that, I created a package and repository: https://github.com/vvo/tzdb The package and data files are automatically updated whenever https://www.geonames.org/export/dump/ data changes. My package has 317 time zones. The grouping of time zones is explained in the README, if you feel like the grouping is wrong, open an issue. Thanks! |
+1 for a simplified list of 24 timezones |
-1 for a list that would not work in a surprisingly large number of cases. (A UTC offset definitely does not equal a timezone.) If we managed to eliminate DST around the world, we'd be closer to only needing 24 timezones. There are other exceptions out there though that would still need special handling. |
Hey guys,
I'm looking to get a simple list of zone objects in packed format. Truthfully when I look at the list outlined here: https://github.com/moment/moment-timezone/blob/develop/data/packed/latest.json the list is just absurdly large and contains many duplicate time zones with different names. I don't want to confuse anyone who wants to pick a simple timezone from a drop down and be done.
Therefore, I would like to request a simple list of Microsoft time zones outlined here: https://msdn.microsoft.com/en-us/library/ms912391(v=winembedded.11).aspx in zone objects packed format (exactly like the list defined in the latest.json). I understand that it is possible to build a list of these objects myself, but looking at the documentation here: https://momentjs.com/timezone/docs/#/data-formats/packed-format/ I really have no idea how to determine Offset Map, Abbr/Offset Index, and Timestamp Diffs.
Would anyone else benefit from a list like this?
The text was updated successfully, but these errors were encountered: