为什么java tzupdater添加闰秒? [英] Why does java tzupdater add leap seconds?
问题描述
如果一年前(java)lib正确地执行UTC时间格式化,考虑到新引入闰秒
文档 JRE软件中的时区数据版本提到:
新的闰秒2015-06-30 23:59:60 UTC根据IERS公告C 49。
第三方Java库Time4J使用自己的闰秒列表。
为什么java的tzupdater工具添加了闰秒,如果它们被Java忽略?
我现在仔细研究了TZUPDATER和IANA的发行说明(在其实验位置github / eggert / tz) :
TZUPDATER说:
墨西哥以美洲/坎昆为代表的金塔纳罗奥州将在中午时间从DST转到东部时间,而不需要DST
2015-02-01 02:00。智利将不会在四月份更换时钟,或以后
;它的新标准时间将是它的旧的夏令时间b $ b时间。这影响到美洲/圣地亚哥,太平洋/复活节和
南极洲/帕尔默。新的闰秒2015-06-30 23:59:60 UTC根据
IERS公告C 49。
IANA说:
发布2015a - 2015-01-29 22:35:20 -0800
影响未来时间戳的变化
由美洲/坎昆代表的墨西哥金塔纳罗奥州
将中午时间从DST转到东部时间,而不在DST
于2015-02-01 02:00。 (感谢Steffen Thorsen和Gwillim Law)
智利在四月或之后不会改变时钟;其新标准时间
将是其旧的夏令时。这影响到美国/圣地亚哥,
太平洋/复活节和南极洲/帕尔默。 (感谢Juan Correa。)
新的闰秒2015-06-30 23:59:60 UTC根据IERS公告C 49.
(感谢Tim Parenti。 )
从这里,Oracle员工最有可能刚刚完成复制和粘贴,而不考虑内容,如果它与Java分发真正相关。唯一的改变是删除作者参考。当然,事实上,在实际的OpenJDK和Oracle-Java发行版中,没有代码或位置可以加载这样的闰秒数据。
在我自己的答案对于此 SO问题,我也指出了最新的相关<一个href =https://github.com/threeten/threeten/issues/197 =nofollow>邮件语句 Threeten项目负责人终于放弃了一个临时可用的计划支持闰秒。因此,您对Java-8的乐观情绪是没有道理的。
顺便说一下,Time4J的最新版本v2.3现在可以部署IANA- TZDB就像您从TZUPDATER工具预期的那样。
There are some references mentioned that leap seconds are ignored by Java:
Do Java system milliseconds take account of leap seconds?
JDK-4272347 : (cal/tz) support leap seconds ticket
Yet the document Timezone Data Versions in the JRE Software mentions:
New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
3rd party Java library Time4J uses it's own list of leap seconds.
Why does java's tzupdater tool add leap seconds if they are ignored by Java?
I have now closely looked at the release-notes of TZUPDATER and IANA (in its experimental location github/eggert/tz):
TZUPDATER says:
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 says:
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.)
From this it is most probable that an Oracle-employee has just done copy-and-paste without thinking much about the content if it is really relevant for the Java-distribution. The only change was removing the author references. Of course, the fact remains that in actual OpenJDK- and Oracle-Java-distributions there is no code or location which could load such leap second data.
In my own answer to this SO-question I have also pointed to the newest related mail statement where the Threeten project leaders finally dropped a temporarily available planned support for leap seconds. So your optimism regarding Java-8 is not justified.
By the way, the newest version v2.3 of Time4J can now deploy the leap second informations contained in the IANA-TZDB as you have this expected from TZUPDATER-tool.
这篇关于为什么java tzupdater添加闰秒?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!