4 ms·
Show HN: Self-updating, simplified time zone list
- vvoyer 6y agoHey HN! I needed to build a current time zones select box much like the one you can find on Google Calendar. Turns out Google Calendar uses a simplified time zone list. But such list is not really standard. First, the actual text being displayed is not a list time zones but rather a list of UTC offsets and their names. For example the IANA time zone list has "America/Los_Angeles". But google calendar displays "Pacific Time - Los Angeles" which is good because most of the time people will email you saying "Let's have this call at 5PM PT" Grouping time zones is tricky, you can group per offset in the same country safely, which is what I've done in this project. The project is self updating given data from geonames using GitHub actions. There's an npm package you can use too. Enjoy!
- deleted 6y ago[deleted]