Is there a reliable way to get a timezone from client browser? I saw the following links but I want a more robust solution.
相关问题
- Angular RxJS mergeMap types
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
For now, the best bet is probably jstz as suggested in mbayloon's answer.
For completeness, it should be mentioned that there is a standard on it's way: Intl. You can see this in Chrome already:
(This doesn't actually follow the standard, which is one more reason to stick with the library)
No. There is no single reliable way and there will never be. Did you really think you could trust the client?