TimeZoneInfo vs. Olson database

こ雲淡風輕ζ 提交于 2019-12-22 03:48:52

问题


Do TimeZoneInfo and Olson database use identical identificators for time zones?

I get timezone id from GeoNames service (which is based on Olson database) and want to retrieve day light saving information for that timezone.


回答1:


The unicode consortium keeps a mapping between Olson database and Windows TimeZone Ids, which can be accessed here.

Also see this SO question and answers for more daylight savings info (Daylight saving time - do and don’ts).




回答2:


No they don't use the same identifiers. A possible solution is to use Noda-Time which foregoes TimeZoneInfo in favour of Olson timezones.

Further reading: What's wrong with DateTime anyway?



来源:https://stackoverflow.com/questions/2620282/timezoneinfo-vs-olson-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!