javadatedatetimetimeleap-second

Why does java tzupdater add leap seconds?


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?


Solution

  • 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.