Popular timezone sometimes doesn't work
See original GitHub issueSome popular timezones like PST
doesn’t work because it’s not in the TIMEZONES
in config file
https://github.com/EddieJaoudeCommunity/EddieBot/blob/46b1e136b749113b2f871b553189e6a55c8c158f/src/config.ts#L30-L36
And some existing timezone that has more than three characters like AEST
wont work because the regular expression matches 2 to 3 characters only [a-zA-Z]{2,3}
, it should match 2 to 4 characters.
https://github.com/EddieJaoudeCommunity/EddieBot/blob/46b1e136b749113b2f871b553189e6a55c8c158f/src/timezone.ts#L20
- const match = message.content.match(/([\d]{1,2})([:\d]{3})?[\s]?(pm|am|AM|PM)?\b[\s]([a-zA-Z]{2,3})?\b/);
+ const match = message.content.match(/([\d]{1,2})([:\d]{3})?[\s]?(pm|am|AM|PM)?\b[\s]([a-zA-Z]{2,4})?\b/);
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
"Set time zone automatically" does not work. Why and how to
Go to Search. Type Data and Time. Open it. · Click on Internet Time tab. · Click on Change settings. · Check Synchronize...
Read more >How to Fix It When the Time on Your Phone Is Wrong - Lifewire
The most likely reason is that the time zone is misconfigured, either because you set it manually or incorrectly. When the wrong time...
Read more >Time zone issues - how to deal with them in the IT project?
Every time zone can be defined as an offset from UTC (in hours, sometimes not full hours). Let's look at some popular ones....
Read more >There's a time zone bug in iOS and iPadOS. Here's what to do ...
Having issues with your iPhone, iPad, or iPod not updating your time zone? Learn different stategies to fix these time zones issues in...
Read more >Time zone does not update automatically - Apple Community
Go to Settings/General/Date & Time and make sure you have Set Automatically turned on. Also go to Settings/Privacy/Location Services. Make sure ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should I do a longitude sweep to cover major time zones in each zone?
maybe we could add a package to get popular timezones, but I don’t know… add the ones you think are important 👍