为什么 java tzupdater 添加闰秒?
Why does java tzupdater add leap seconds?
有一些参考资料提到闰秒被 Java 忽略:
How can a 1 year old (java) lib correctly perform an UTC Time formatting, considering a newly introduced leap second
Do Java system milliseconds take account of leap seconds?
JDK-4272347 : (cal/tz) support leap seconds ticket
但是文档 Timezone Data Versions in the JRE Software 提到:
New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
第 3 方 Java 库 Time4J 使用它自己的闰秒列表。
如果 Java 忽略 java 的 tzupdater 工具,为什么要添加闰秒?
我现在仔细查看了 TZUPDATER 和 IANA 的发行说明(在其实验位置 github/eggert/tz):
TZUPDATER 说:
The Mexican state of Quintana Roo, represented by America/Cancun, will
shift from Central Time with DST to Eastern Time without DST on
2015-02-01 at 02:00. Chile will not change clocks in April or
thereafter; its new standard time will be its old daylight saving
time. This affects America/Santiago, Pacific/Easter, and
Antarctica/Palmer. New leap second 2015-06-30 23:59:60 UTC as per
IERS Bulletin C 49.
IANA 表示:
Release 2015a - 2015-01-29 22:35:20 -0800
Changes affecting future time stamps
The Mexican state of Quintana Roo, represented by America/Cancun,
will shift from Central Time with DST to Eastern Time without DST
on 2015-02-01 at 02:00. (Thanks to Steffen Thorsen and Gwillim Law.)
Chile will not change clocks in April or thereafter; its new standard time
will be its old daylight saving time. This affects America/Santiago,
Pacific/Easter, and Antarctica/Palmer. (Thanks to Juan Correa.)
New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
(Thanks to Tim Parenti.)
据此很可能是 Oracle 员工刚刚完成了 复制和粘贴,而没有考虑太多内容,如果它确实与 Java-分发。唯一的变化是删除作者参考。当然,事实仍然是,在实际的 OpenJDK- 和 Oracle-Java- 发行版中,没有代码或位置可以加载这样的闰秒数据。
在我自己对此 SO-question I have also pointed to the newest related mail statement 的回答中,Threeten 项目负责人最终放弃了对闰秒的临时可用计划支持。所以你对 Java-8 的乐观是没有道理的。
顺便说一句,Time4J 的最新版本 v2.3 现在可以部署包含在 IANA-TZDB 中的闰秒信息,正如您从 TZUPDATER-tool 中期望的那样。
有一些参考资料提到闰秒被 Java 忽略:
How can a 1 year old (java) lib correctly perform an UTC Time formatting, considering a newly introduced leap second
Do Java system milliseconds take account of leap seconds?
JDK-4272347 : (cal/tz) support leap seconds ticket
但是文档 Timezone Data Versions in the JRE Software 提到:
New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
第 3 方 Java 库 Time4J 使用它自己的闰秒列表。
如果 Java 忽略 java 的 tzupdater 工具,为什么要添加闰秒?
我现在仔细查看了 TZUPDATER 和 IANA 的发行说明(在其实验位置 github/eggert/tz):
TZUPDATER 说:
The Mexican state of Quintana Roo, represented by America/Cancun, will shift from Central Time with DST to Eastern Time without DST on 2015-02-01 at 02:00. Chile will not change clocks in April or thereafter; its new standard time will be its old daylight saving time. This affects America/Santiago, Pacific/Easter, and Antarctica/Palmer. New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
IANA 表示:
Release 2015a - 2015-01-29 22:35:20 -0800
Changes affecting future time stamps The Mexican state of Quintana Roo, represented by America/Cancun, will shift from Central Time with DST to Eastern Time without DST on 2015-02-01 at 02:00. (Thanks to Steffen Thorsen and Gwillim Law.) Chile will not change clocks in April or thereafter; its new standard time will be its old daylight saving time. This affects America/Santiago, Pacific/Easter, and Antarctica/Palmer. (Thanks to Juan Correa.) New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49. (Thanks to Tim Parenti.)
据此很可能是 Oracle 员工刚刚完成了 复制和粘贴,而没有考虑太多内容,如果它确实与 Java-分发。唯一的变化是删除作者参考。当然,事实仍然是,在实际的 OpenJDK- 和 Oracle-Java- 发行版中,没有代码或位置可以加载这样的闰秒数据。
在我自己对此 SO-question I have also pointed to the newest related mail statement 的回答中,Threeten 项目负责人最终放弃了对闰秒的临时可用计划支持。所以你对 Java-8 的乐观是没有道理的。
顺便说一句,Time4J 的最新版本 v2.3 现在可以部署包含在 IANA-TZDB 中的闰秒信息,正如您从 TZUPDATER-tool 中期望的那样。