Skip to content
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

Wrong tz name in IE 11 Pacific/Kwajalein #482

Closed
artemijan opened this issue Apr 10, 2017 · 4 comments
Closed

Wrong tz name in IE 11 Pacific/Kwajalein #482

artemijan opened this issue Apr 10, 2017 · 4 comments
Labels

Comments

@artemijan
Copy link

moment.tz.guess() in IE 11 returns "Pacific/Kwajalein" if i switched to tz -12 (windows 7). But it's UTC+12

mattjohnsonpint added a commit to mattjohnsonpint/moment-timezone that referenced this issue Apr 10, 2017
@mattjohnsonpint
Copy link
Contributor

So what is happening here is that UTC-12 is not currently in use by any populated location on Earth. We have been excluding non-populated zones from the guessing algorithm.

Pacific/Kwajalein is on UTC+12 now, but it used to be on UTC-12. It jumped sides of the IDL in August 1993. Since prior-year offsets are in the guessing algorithm, and no other populated location was ranked higher, it chose that zone.

Including zero-population zones in the guessing algorithm will fix this, as current-year offset carries a higher rank in the algorithm than population.

@artemijan
Copy link
Author

artemijan commented Apr 11, 2017

I guess that in chrome it works because of Intl impl has timezone and IE doesn't?

@mattjohnsonpint
Copy link
Contributor

mattjohnsonpint commented Apr 12, 2017

Right. Most browsers have the Intl time zone support now. So the guessing algorithm doesn't kick in.

(expand the DateTimeFormat section on that chart)

@isHanz89
Copy link

Hi Matt,

I having the same issue here. My local computer time zone is set to Kuala Lumpur/Singapore.
When I use IE, it will show Asia/Manila and if I use Chrome, it work fine.

Is there any work around for it?

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants