【发布时间】:2011-06-16 23:26:43
【问题描述】:
我获得了 TzID(Olson tzid 格式 Exp:“Europe/Copenhagen”)。之后,我尝试使用 c# TimeZonInfo 类将某个 DateTime 从该时区(与服务器本地时区不同)转换为 UTC。
我想知道为什么 window 的时区 id 只有大约 100,而 Olson 的时区 id tz 数据库大约有 405 tz id。假设时区“欧洲/哥本哈根”,我不知道如何使用 FindSystemTimeZonebyID 来获取该时区的时区信息(它在 Olson ID to windows ID convertion table 的元区中列出)。有人有这方面的经验吗?请帮帮我。
【问题讨论】:
标签: c# windows datetime timezone registry