Why does java tzupdater add leap seconds?

孤者浪人 提交于 2019-12-11 03:09:32

问题


There are some references mentioned that leap seconds are ignored by 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

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?


回答1:


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.



来源:https://stackoverflow.com/questions/28918934/why-does-java-tzupdater-add-leap-seconds

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!