You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, can you please comment on how JSTZ compares to Moment timezone in detecting user's timezone? I will greatly appreciate if you can compare about the reliability, browser, and OS support.
Thank you for creating such a helpful resource!
The text was updated successfully, but these errors were encountered:
I found the following at Moment's website. Do you have any information like the following for JSTZ? Thank you!
Moment Timezone uses the Internationalization API (Intl.DateTimeFormat().resolvedOptions().timeZone) in supported browsers to determine the user's time zone.
On other browsers, time zone detection is rather tricky to get right, as there is little information provided by those browsers. For those, it will use Date#getTimezoneOffset and Date#toString on a handful of moments around the current year to gather as much information about the browser environment as possible. It then compares that information with all the time zone data loaded and returns the closest match. In case of ties, the time zone with the city with largest population is returned.
What I remember is that at the time moment timezone did not support detection. Maybe I missed it in the docs, but that's why I originally forked this lib. If you're already using moment and it does support that functionality perhaps this lib is unnecessary.
As for whether moment is more reliable... Probably. I suppose you would have to see how this lib stacks up to their test suite which is certainly much more extensive.
Hi, can you please comment on how JSTZ compares to Moment timezone in detecting user's timezone? I will greatly appreciate if you can compare about the reliability, browser, and OS support.
Thank you for creating such a helpful resource!
The text was updated successfully, but these errors were encountered: