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 badges
Add a ment  | 

1 Answer 1

Reset to default 7

According 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