BibleGateway.com Verse Of The Day

Thursday, February 22, 2007

2007 DST Issues And Java

This daylight savings time (DST) issue is a pain in my buttI didn't need right now. We still have legacy applications running on JRE 1.2.2, and since it is Silverstream 3.5, changing anything out from under will destroy the world and it will not run right, if at all.

Links to Sun's FAQ is at http://java.sun.com/developer/technicalArticles/Intl/USDST_Faq.html
Of notable interest here is this little tidbit of crap:
  1. Do my operating system's timezone patches fix the Java platform's timezone data?
    • No. The Java SE platform's timezone data is not read from the local or host operating system.
    • The Java SE platform maintains a private repository of timezone data in locally installed files (.../jre/lib/zi) as part of the Java Runtime Environement (JRE) software.
      • Applying whatever operating system timezone patches (for example Solaris OS, Linux, Windows) will have no effect on the accuracy of the Java SE platform's timezone data.

Well isn't that lovely? Java doesn't rely on the underlying OS to get timezone info. I'm sure there's a "good" reason, but it seems like pointless redundancy to me. Why set it up on the OS if the JVM doesn't use it? Sure there is probably some backward OS that has no concept of timezones, so Java abstracts everything to a point of uselessness just like Swing UI's.

If installing or updating new JRE is not an option (say, in production where the app server and all the apps haven't been tested on newer JRE's) The JRE updater tool is found at http://java.sun.com/developer/technicalArticles/Intl/USDST_Faq.html -- not sure how reliable ot stable that thing is, but we'll find out in our dev and test environments soon enough.

There is a brief discussion on the Jboss forums at http://jboss.org/index.html?module=bb&op=viewtopic&t=98682 as well. Or for Websphere http://www-1.ibm.com/support/docview.wss?rs=180&context=SSEQTP&dc=D600&uid=swg21219396#actions.

2 comments:

Robb said...

Looks like I am not the only one complaining about this. An existing defect exists to point out that Java should take TZ info from underlying system. And I was right, Sun has some crappy response about not being a bug because no hard standard exists, the Olsen DB is kind of accepted but not official, and some platforms might not handle TZ's properly or at all.

Link is http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6468394.

Anonymous said...

At least Sun got the updater right. No issues running that thing. Run the updater in test mode, see that a whole butt load of tests fail. Run the updater, and it finishes up quick and without issues. Run tester again and it's all good. I just patched about a dozen production Jboss servers and a stand-alone RMI server in just about an hour flat, and that included time to shutdown and restart the server and do some rudimentary testing that it came back up OK.