TimeZoneInfo GetSystemTimeZones() 全球化
TimeZoneInfo GetSystemTimeZones() globalization
TimeZoneInfo.GetSystemTimeZones() 从本地注册表获取时区,因此不同机器的时区列表存在一些差异,无论如何在所有 windows 计算机中获取相同的数据。
var timeZones = TimeZoneInfo.GetSystemTimeZones();
如果你想要一个明确的方法来获取时区列表,那么我建议使用 timezone database from IANA。您可以下载数据库并通过网络服务公开它。
noda time comes with a version of the timezone database. so when you use noda time you are referring to the time zones in the IANA database. it also offers you to upgrade the database 无需更新 noda 时间 API 本身,这非常酷。因此,通过使用 noda time,您将无法了解本地配置的时区设置。
我不知道网络上有任何网络服务可以用来检索此信息以用于商业用途。对于非商业用途,您可以使用 timezone db api
TimeZoneInfo.GetSystemTimeZones() 从本地注册表获取时区,因此不同机器的时区列表存在一些差异,无论如何在所有 windows 计算机中获取相同的数据。
var timeZones = TimeZoneInfo.GetSystemTimeZones();
如果你想要一个明确的方法来获取时区列表,那么我建议使用 timezone database from IANA。您可以下载数据库并通过网络服务公开它。
noda time comes with a version of the timezone database. so when you use noda time you are referring to the time zones in the IANA database. it also offers you to upgrade the database 无需更新 noda 时间 API 本身,这非常酷。因此,通过使用 noda time,您将无法了解本地配置的时区设置。
我不知道网络上有任何网络服务可以用来检索此信息以用于商业用途。对于非商业用途,您可以使用 timezone db api