moment-timezone
moment-timezone copied to clipboard
Missing time zone data still uses local time zone instead of invalid date
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.
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.
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?
@mj1856 thanks for you suggest and update my fiddle.
I'd like to leave this open to track the problem of it not returning an invalid date message.