7

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?

4

1 回答 1

5

根据MDN

实现必须识别的唯一值是“UTC”;默认值是运行时的默认时区。实现还可以识别IANA 时区数据库的时区名称,例如“Asia/Shanghai”、“Asia/Kolkata”、“America/New_York”。

于 2015-07-09T01:19:36.637 回答