admin管理员组文章数量:1314216
I'm relying on Intl
to determine user's time zone.
I also want to give users a way to pick their timezone. I have a list of time zones -- some subset of Olson database.
I wanna make sure Intl
won't give me some weird time zone I don't have in my list.
Where does Intl API get it's time zone list? Is there a way to list all of them or does it trust the browser?
I'm relying on Intl
to determine user's time zone.
I also want to give users a way to pick their timezone. I have a list of time zones -- some subset of Olson database.
I wanna make sure Intl
won't give me some weird time zone I don't have in my list.
Where does Intl API get it's time zone list? Is there a way to list all of them or does it trust the browser?
Share Improve this question asked Jul 9, 2015 at 1:09 skfdskfd 2,5961 gold badge19 silver badges32 bronze badges1 Answer
Reset to default 7According to MDN:
The only value implementations must recognize is "UTC"; the default is the runtime's default time zone. Implementations may also recognize the time zone names of the IANA time zone database, such as "Asia/Shanghai", "Asia/Kolkata", "America/New_York".
本文标签: javascriptWhere does Intl API get it39s time zone listStack Overflow
版权声明:本文标题:javascript - Where does Intl API get it's time zone list? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741930417a2405542.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论