Mac OS X, Java JRE, and Energy Policy Act of 2005

As Ian Ward Comfort notes on the MacEnterprise list, “it looks like a lot of people are going to have a problem” with Apple’s current Java runtime environment during the daylight savings time switch in March.

The most up-to-date shipping version of the JRE on Mac OS X Tiger responds the same way it did for Ian on my test system when running Sun’s tzupdater.jar tool:


$ date
Fri Feb 2 07:27:08 EST 2007
$ java -jar ./tzupdater.jar -t -v
java.home: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
java.vendor: Apple Computer, Inc.
java.version: 1.5.0_06
JRE time zone data version: tzdata2005m
There's no tzdata available for this Java runtime.

The tool from Sun will not update Apple’s JVM, unfortunately, even though it will tell you what version of the time zone data is installed. (For more info on Java and the 2007 changes, see Sun’s “US Daylight Savings Time Changes and the Java SE Platform” FAQ.)

What implications there might be for an out-of-date time zone file in the Java JVM…that, I don’t know. The sky is not necessarily falling.

But, the Apple JVM as of this moment evidently doesn’t include the daylight saving time changes first encoded in the Olson 2005n database—the JVM is older than 5.0_7, the first one Sun lists as including it, anyway—which means it apparently doesn’t incorporate the shift introduced by the Energy Policy Act of 2005. Of course, there is the possibility that the Apple JRE is different; it may tie into system time rather than rely on the JVM’s own facilities, and if you’re on Mac OS X 10.4.6 or later, that might mean everything is fine.

Hm.

Update 03/15/2007: Apple did patch this before DST 2007. However, I have heard of a subsequent last-minute Sun JRE update that I’m not sure is incorporated in Apple’s patch. However, it should be noted that after Apple’s Java patch, I do get the following output from Sun’s tool, indicating that the time zone data does exceed the problematic “tzdata2005r” version:


$ java -jar ./tzupdater.jar -t -v
java.home: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
java.vendor: Apple Computer, Inc.
java.version: 1.5.0_07
JRE time zone data version: tzdata2007a
There's no tzdata available for this Java runtime.