缺少 Microsoft 时区 [英] Missing Microsoft time zones

查看:33
本文介绍了缺少 Microsoft 时区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑使用 Microsoft 时区(通过使用 System.TimeZoneInfo 类在 C# 中)将存储的 UTC 日期转换为本地时区日期,反之亦然.

I'm looking at using the Microsoft time zones (by utilising the System.TimeZoneInfo class in C#) to convert stored UTC dates to local timezone dates and vice versa.

但是,我注意到这不是一个完整的列表.例如,它目前只有一个为格陵兰定义的时区(Greenland Standard Time (GMT-03:00) Greenland),其中 维基百科timeanddate 两者都显示有 2 个主要时区在使用(东部和西部)以及 2 个较少使用的时区.

However, I've noticed that this isn't a comprehensive list. For example, it currently only has one timezone defined for Greenland (Greenland Standard Time (GMT-03:00) Greenland), where wikipedia and timeanddate both show there are 2 major time zones in use (eastern and western) as well as 2 lesser used ones.

是否有缺少时区的完整列表?

Is there a comprehensive list anywhere of missing timezones?

推荐答案

Windows 时区 ID 和 IANA 时区 ID 可通过 CLDR 获得.

The conversion data between Windows time zone IDs and IANA time zone IDs is available via CLDR.

查看数据(以及 Github 中的原始 IANA 数据),看起来像是 IANA 时间有问题的区域是:

Looking at the data (and at the raw IANA data in Github) it looks like the IANA time zones in question are:

  • 美国/Godthab"(西格陵兰)
  • America/Scoresbysund"(东格陵兰)

那些具有以下相应 Windows 时区 ID:

Those have corresponding Windows time zone IDs of:

  • 格陵兰标准时间"(西格陵兰)
  • 亚速尔群岛标准时间"(嗯,不是真正的东格陵兰 - 请继续阅读)

显然亚速尔群岛和东格陵兰岛相距很远 - 但事实证明它们遵循相同的时区规则,这大概是微软将它们归为一个时区的原因.

Obviously the Azores and East Greenland are quite a long way apart - but it turns out they follow the same time zone rules, which is presumably why Microsoft has lumped them under a single time zone.

基本上,如果您想找到America/Scoresbysund"在东格陵兰的时间,那么亚速尔标准时间"是您最接近的选择.

Basically, if you want to find the time in East Greenland for "America/Scoresbysund", then "Azores Standard Time" is your closest bet.

这篇关于缺少 Microsoft 时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆