The Source for Java Technology Collaboration
User: Password:



John O'Conner

John O'Conner's Blog

Updating time zone data just got easier

Posted by joconner on November 26, 2006 at 06:52 PM | Comments (10)

Earlier this year, Australia made changes to their time zones that required a completely new JRE. Then, the US announced time zone changes for 2007 that required a completely new JRE...unless of course you don't mind reporting incorrect time during the affected periods.

I expected there might be some grumbling about the fact that you had to update an entire JRE just to update some exchangeable time zone data. For those that ignored the message the first time, your job just got easier. Sun just announced a beta version of a tool that will update the time zone data in place. You don't have to download a new JRE with the updates; you can just update the JRE you already have. The tool will be maintained to provide the latest updates as they're needed. So, when this happens again (and it will), you'll just need to use this tool instead of replacing your JRE. Hey, that's good news right?

More information about the tzupdater tool is available on the Sun Developer Network site. You can also download the tool on the Java SE downloads page.

This is still beta software, so you might want to test it on a non-critical system first. One caveat is that it only works with JREs provided by Sun.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • It has already happened again! Western Australia is introducing daylight saving from 2 december 2006. That is just 6 days away.

    Posted by: mthornton on November 27, 2006 at 06:31 AM

  • If changing the JRE is not an option for you, but using an open source project is, take a look at Joda Time. It has got some very useful utility classes for dealing with dates, timespans etc.

    Posted by: spjelkavik on November 28, 2006 at 12:41 AM

  • The current version of tzupdater (1.0-beta) is using Olsen data tz2006n. I don't think this version of the time zone data includes the DST fixes for Western Australia (WA). How can I check without installing to be sure? The current public version of the time zone database is 2006p. How can I get a later verion of tzupdater with Olsen data tz2006p BEFORE this Sunday, 3rd Dec. 2006 when WA DST start?!

    Posted by: gmuller2 on November 29, 2006 at 09:13 AM

  • @gmuller2, you're right. This particular version of the tzupdater tool is for timezone data that affects the US in 2007. Some relief for the US, but those in Australia still need to get that updated JRE.

    Posted by: joconner on November 29, 2006 at 10:30 AM

  • Curently there is no updated JRE either!! The latest release of JRE (5.0 Update 9) pre-dated the Western Australian DST legislation. It will also be a far greater effort to update JRE and retest all the applications. Not possible in the two days remaining.
    IBM have a Time Zone Update Utility for Java, which uses time zone data tz2006o (includes WA DST change). Unfortunately it only works for IBM Java versions.
    We really need an updated version of tzupdater! Alternatively, is there a way to convert the tzdata (zoneinfo) source to the Java time zone format ourselves similar to using the zic OS utility?

    Posted by: gmuller2 on November 29, 2006 at 03:37 PM

  • Do you know if that tool will be able to update the Java in a Windows server or only for a Solaris.

    Posted by: rotidboeuf on December 12, 2006 at 12:31 PM

  • Sun's tzupdater tool will work for all Sun suppled JDKs from v 1.4.

    Posted by: joconner on December 12, 2006 at 02:46 PM

  • Why is the tool coupled to a particular version of Olson timezone database? It would be much more useful if the tool and the data file would be independent, i.e. the tz200?? file would be an input to the tool and not hardcoded with it.

    Posted by: malm on December 14, 2006 at 05:37 PM

  • Good question, maim...I don't know the answer. I'll find out what I can. Certainly your idea should be an end goal.

    Posted by: joconner on December 14, 2006 at 07:49 PM

  • The tzupdater works not only with JREs provided by Sun, but also with Mac OS X's JREs (and maybe also with more JREs from different vendors/Java licensees). You need to set the system property called "java.vendor" to "Sun Microsystems Inc." to make the tzupdater happy. See also my posting at the Apple mailing list.

    Posted by: jonelo on January 08, 2007 at 01:00 PM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds