2

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?

Community
  • 1
  • 1
Alex
  • 2,361
  • 1
  • 20
  • 27
  • 2
    Why do you think that tzupdater adds leap seconds? – Dawood ibn Kareem Mar 07 '15 at 19:39
  • David, as I understand, the latest tzupdater based on tzdata2015a adds leap second: http://www.oracle.com/technetwork/java/javase/tzdata-versions-138805.html – Alex Mar 08 '15 at 11:08
  • Good question, but I think it is just a copy-and-paste action in release-notes of tzupdater. The TZDB-maintainers have this entry in their release notes, and Oracle just copies it (but NOT the leap second data!). – Meno Hochschild Mar 17 '15 at 19:00

1 Answers1

2

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.

Community
  • 1
  • 1
Meno Hochschild
  • 42,708
  • 7
  • 104
  • 126
  • There is a good explanation about TZUpdater 2.0 at https://blogs.oracle.com/java-platform-group/entry/understanding_time_zone_updater_2 – Costlow Jun 30 '15 at 22:00
  • @Costlow It is really astonishing that Oracle has even given the meaningless advice to update the tz repository using TZUpdater 2.0 for help about leap second, see [here](https://blogs.oracle.com/java-platform-group/entry/the_2015_leap_second_s). It seems not everyone at Oracle is really involved in the matter. They have even pointed to the wrong statement of Java-API speaking about possible second values in the range 0-61 (the value 61 is impossible!). – Meno Hochschild Jul 01 '15 at 08:11