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
dreeves opened this issue
Apr 3, 2018
· 2 comments
Labels
ADOConsensus needed on what to Actually Do (or "much ado about ∅"), AKA questionRFERequest For Enhancement AKA feature requestUVIUser-Visible Improvementzzz(closed as) postponed
For modern browsers there’s something built in to Javascript that should work:
Intl.DateTimeFormat().resolvedOptions().timeZone
That correctly returns America/Los_Angeles for me in Chrome and looks pretty safe to use in general: https://caniuse.com/#search=Intl
I gather there's a concern from @chrisbutler and @pjjh that geoIP/IPAPI may better handle the use case of someone traveling. I believe, contrariwise, that the above javascript is always the right thing to use. If you haven’t changed the timezone for your computer then we should treat that as intentional and not try to be clever and figure out where you really are by your IP address.
The text was updated successfully, but these errors were encountered:
Correction from @chrisbutler: It's not traveling but rather @pjjh's use case of creating promises via Curl. In my opinion that could make geoIP worthwhile as a fallback. But really if you're going to create a promise programmatically with Curl then I think there are better ways to make sure your timezone is right.
dreeves
added
UVI
User-Visible Improvement
ADO
Consensus needed on what to Actually Do (or "much ado about ∅"), AKA question
zzz
(closed as) postponed
labels
Apr 8, 2018
I'll snooze this now since it's not particularly pressing and there are concerns about the right way to infer timezone, and it could end up moot if we let users choose their timezone in the future and always use that.
ADOConsensus needed on what to Actually Do (or "much ado about ∅"), AKA questionRFERequest For Enhancement AKA feature requestUVIUser-Visible Improvementzzz(closed as) postponed
For modern browsers there’s something built in to Javascript that should work:
That correctly returns
America/Los_Angeles
for me in Chrome and looks pretty safe to use in general: https://caniuse.com/#search=IntlI gather there's a concern from @chrisbutler and @pjjh that geoIP/IPAPI may better handle the use case of someone traveling. I believe, contrariwise, that the above javascript is always the right thing to use. If you haven’t changed the timezone for your computer then we should treat that as intentional and not try to be clever and figure out where you really are by your IP address.
The text was updated successfully, but these errors were encountered: