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

Missing time zone data still uses local time zone instead of invalid date #265

Open
winweb opened this issue Oct 29, 2015 · 4 comments
Open
Labels

Comments

@winweb
Copy link

winweb commented Oct 29, 2015

I test on http://jsfiddle.net/win_web/uq99udc9/3/

I compare with America/Los_Angeles time.

both timezone had same result.

Asia/Bangkok timezone used GMT+7.

@mattjohnsonpint
Copy link
Contributor

You did not load any time zone data. I updated your fiddle by using the moment-timezone-with-data-2010-2020.min.js file instead of moment-timezone.min.js, and it works fine.

However, I thought we had taken care of that with #106. Apparently there's been a regression.

@mattjohnsonpint mattjohnsonpint changed the title Asia/Bangkok timezone not work Missing time zone data still uses local time zone (possible regression) Oct 29, 2015
@mattjohnsonpint
Copy link
Contributor

Ok, if you look at your original fiddle (not my updated copy), open the F12 developer tools and you'll see the error message on the console.

HOWEVER, despite the error, the format function still used the local time zone, rather than showing "Invalid Date".

@timrwood - any thoughts?

@winweb
Copy link
Author

winweb commented Oct 30, 2015

@mj1856 thanks for you suggest and update my fiddle.

@winweb winweb closed this as completed Oct 30, 2015
@mattjohnsonpint
Copy link
Contributor

I'd like to leave this open to track the problem of it not returning an invalid date message.

@mattjohnsonpint mattjohnsonpint changed the title Missing time zone data still uses local time zone (possible regression) Missing time zone data still uses local time zone instead of invalid date Oct 30, 2015
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

2 participants