-
Notifications
You must be signed in to change notification settings - Fork 838
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
Incorrect Timezone guessed for UTC #559
Comments
Yes, I can confirm this is a bug. It returns incorrectly in all browsers when the time zone is set to UTC on Windows. Note that if you're actually in the UK, set your time zone to |
That's incorrect. In Chrome on Windows it returns 'UTC'. Is this bug going to be fixed? |
Chrome gives Note that if your customers are actually in London and have their time zone set for UTC, they are actually going to get the wrong time on their computer's clock when London is on British Summer Time. Also, note that |
Any timings on when this will be fixed? |
Any update on this issue? Thanks |
I'm also experiencing this issue in Chrome, It gives Africa/Abidjan when window is set to UTC. Thank in advance. |
Just came across this when I upgraded to the latest release. from moment-timezone.js:
So it looks at Anyways the code falls into manual guess mode where it looks like it's trying to compare offsets with known zones, and when you alphabetically sort all the zones that have the same timezone offset you're left with Africa/Abidjan as the first in the list. Can the length test be dropped? |
Just bumped into this. "UTC" fails in HeadlessChrome 71.0.3578. |
- Removed guessed timezone length check in order to treat "UTC" as valid timezone(moment#559) - Updated version to 0.6.33
On a Windows 10 laptop in IE 11 when running
moment.tz.guess()
it returns "Africa/Abidjan" when the timezone is set to "(UTC) Co-ordinated Universal Time". On the same laptop in Chrome it correctly returns "UTC"Running the following code produces the following outputs:
Internet Explorer 11 (London)
undefined
Fri Nov 10 2017 10:37:23 GMT+0000 (GMT Standard Time)
10/11/2017 10:37:23
0
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; rv:11.0) like Gecko
2.19.1
Edge (London)
Fri Nov 10 2017 10:39:42 GMT+0000 (GMT Standard Time)
10/11/2017 10:39:42
0
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299
2.19.1
undefined
Internet Explorer 11 (UTC)
undefined
Fri Nov 10 2017 10:42:32 GMT+0000 (Co-ordinated Universal Time)
10/11/2017 10:42:32
0
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; rv:11.0) like Gecko
2.19.1
Edge (UTC)
Fri Nov 10 2017 10:44:22 GMT+0000 (Co-ordinated Universal Time)
10/11/2017 10:44:22
0
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299
2.19.1
undefined
The text was updated successfully, but these errors were encountered: