为什么 Windows Server 2008 认为意大利应该在西欧时间?
Why does Windows Server 2008 think Italy should be in W. European Time?
为什么 MS Windows(特别是此处的服务器 2008)认为意大利在西欧时间,而(我认为)根据我能找到的所有其他来源它应该在中欧时间?
TZUtil /g 给出:
W. Europe Standard Time
控制面板显示:
(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
我在网上找到的所有其他来源,例如:
http://www.timeanddate.com/worldclock/italy/rome
声称意大利是中欧Time/Central 欧洲夏令时。 (CET/CEST).
在 Java 中工作以给出正确时间的 Olson 名称是 "Europe/Rome",这与控制面板一致,但 Olson 认为 Europe/Rome 是 CET,而不是 WET。
谁是正确的?
我的具体问题是我试图将 Windows/C++ 服务器端的 strftime 调用的输出转换为 java GregorianCalendar(使用正确的 timezone/DST). SimpleDateFormat.parse 对时区的理解不包括 MS 的时区 ID,(遗憾的是也不理解正确的时区 ID,根据此讨论:http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-March/032050.html)。
所以我必须将 "W. Europe Standard Time" 之类的东西转换成 "CET",SimpleDateFormat 可以解析它。我知道 CLDR 提供了从 MS 名称到 Olson 名称的映射,但我还需要 MS 名称到缩写。
不要将任何内容读入为 Windows 时区选择的标识符。 "W. Europe Standard Time" 除了这个特定时区条目的 ID 之外,没有任何特别的含义。
说意大利使用欧洲中部时间或欧洲中部夏令时(取决于夏令时是否生效)确实更准确。但是,"W. Europe Standard Time" 标识符与 "WET" 缩写
没有任何关系
还有许多其他示例,其中一些列在 the timezone tag wiki 中(在时区数据库部分)。
另外,有些人可能认为这个问题更适合 superuser.com or serverfault.com,除非你的问题是关于在编程中使用它的具体问题,例如通过 .NET 的 TimeZoneInfo
class .您可能希望编辑您的问题以阐明预期用途。
相关 - 考虑 .NET 中的 CLDR indeed maps "Europe/Rome"
to "W. Europe Standard Time"
, and that you can use my TimeZoneNames 库以从任一区域获取适当的名称和缩写。
var names = TZNames.GetNamesForTimeZone("W. Europe Standard Time", "en");
names.Generic == "Central European Time"
names.Standard == "Central European Standard Time"
names.Daylight == "Central European Summer Time"
var abbreviations = TZNames.GetAbbreviationsForTimeZone("W. Europe Standard Time", "en");
abbreviations.Generic == "CET"
abbreviations.Standard == "CET"
abbreviations.Daylight == "CEST"
为什么 MS Windows(特别是此处的服务器 2008)认为意大利在西欧时间,而(我认为)根据我能找到的所有其他来源它应该在中欧时间?
TZUtil /g 给出:
W. Europe Standard Time
控制面板显示:
(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
我在网上找到的所有其他来源,例如:
http://www.timeanddate.com/worldclock/italy/rome
声称意大利是中欧Time/Central 欧洲夏令时。 (CET/CEST).
在 Java 中工作以给出正确时间的 Olson 名称是 "Europe/Rome",这与控制面板一致,但 Olson 认为 Europe/Rome 是 CET,而不是 WET。
谁是正确的?
我的具体问题是我试图将 Windows/C++ 服务器端的 strftime 调用的输出转换为 java GregorianCalendar(使用正确的 timezone/DST). SimpleDateFormat.parse 对时区的理解不包括 MS 的时区 ID,(遗憾的是也不理解正确的时区 ID,根据此讨论:http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-March/032050.html)。
所以我必须将 "W. Europe Standard Time" 之类的东西转换成 "CET",SimpleDateFormat 可以解析它。我知道 CLDR 提供了从 MS 名称到 Olson 名称的映射,但我还需要 MS 名称到缩写。
不要将任何内容读入为 Windows 时区选择的标识符。 "W. Europe Standard Time" 除了这个特定时区条目的 ID 之外,没有任何特别的含义。
说意大利使用欧洲中部时间或欧洲中部夏令时(取决于夏令时是否生效)确实更准确。但是,"W. Europe Standard Time" 标识符与 "WET" 缩写
没有任何关系还有许多其他示例,其中一些列在 the timezone tag wiki 中(在时区数据库部分)。
另外,有些人可能认为这个问题更适合 superuser.com or serverfault.com,除非你的问题是关于在编程中使用它的具体问题,例如通过 .NET 的 TimeZoneInfo
class .您可能希望编辑您的问题以阐明预期用途。
相关 - 考虑 .NET 中的 CLDR indeed maps "Europe/Rome"
to "W. Europe Standard Time"
, and that you can use my TimeZoneNames 库以从任一区域获取适当的名称和缩写。
var names = TZNames.GetNamesForTimeZone("W. Europe Standard Time", "en");
names.Generic == "Central European Time"
names.Standard == "Central European Standard Time"
names.Daylight == "Central European Summer Time"
var abbreviations = TZNames.GetAbbreviationsForTimeZone("W. Europe Standard Time", "en");
abbreviations.Generic == "CET"
abbreviations.Standard == "CET"
abbreviations.Daylight == "CEST"