Geeks With Blogs
Peter Stathakos - Stack Of Toast Microsoft, .NET and Life in General

As many of you may know, this year involves a change to the Daylight Savings Time system in the US and by extension, Canada and other countries worldwide. These changes are due to the US Energy Policy Act of 2005. The basic theory of all these changes is that by extending the DST window by four weeks, we will all save a little more energy by having an hour more darkness in the morning and an hour less in the evening (when consumption is higher). I guess we'll see in 2008.

 

So, how does this affect computer systems you ask? Nowadays, all systems adjust for DST automatically. a simple patch needs to be applied to Windows system in order to ensure that the clock changes properly according to the new schedule. The patch can be found here:

Windows 2007 Daylight Savings Time Updates

 

However, one of the applications which I currently own at work happens to run inside a Java environment. The update for Java is a bit trickier. First start of by checking out this link on Guidance on updating Java SDKs and JREs for Daylight Saving Time (DST) changes.

Once I downloaded the JTZU utility, I used the following procedure:

1. Save and extract jtzu-1.2.7a.zip. I obtained the file from http://www-1.ibm.com/support/docview.wss?rs=3068&uid=swg21249339

2. Save the file to a temp directory of your choice, ideally one with no spaces in the name (you'll thank me for this) and extract the contents of the zip file. Let's call this directory D:\temp, just for fun.


3. If the JRE is for a WebSphere installation, as mine was, run the file ..\WebSphere\AppServer\bin\setupCmdLine.bat. This sets the JAVA_HOME variable, although I'm not sure it is necessary to do so, I did anyway.

4. Edit D:\temp\DST Updates\jtzu-1.2.7a\DirectorySearch.txt to only contain the word "all", without quotes. This is used if the update utility is set to locate installed instances of Java on the server.

5. Edit D:\temp\DST Updates\jtzu-1.2.7a\runjtzuenv.bat.
Set up the JAVA_HOME variable to the directory of the Java JRE.

ex: JAVA_HOME="D:\Progra~1\WebSphere\AppServer\java\jre"

Note: On a Windows 2003 system, the patch worked fine with the path as above, including the quotes. On a Windows 2000 system I had to remove the quotation marks in order to get it to run properly.

Set NOGUI=false

This will use a GUI for the installation process.

6. Run the file D:\temp\DST Updates\jtzu-1.2.7a\runjtzu.bat.

7. Using the GUI select a particular JRE location, or have the utility search for all instances. If there are only one or two JRE instances on the server, it's probably better to pick them up manually rather than waste time having the utility search the entire system for them.

The update (in my case) took less than two minutes to run.

The big problem I had with this tool is having to set the JRE in multiple places when I would have expected to just have to set it twice. Once to choose which JRE I wished to use to run the utility, and the other to point to the JRE to patch. Compared to Microsoft patches which are basically seamless (download, run, and done) this patch was a real pain.

Oh, and don't get me started on the documentation for the JTZU patch. Can you please cram some more junk onto one page with very few examples? IBM did not make this an easy or pleasant experience. Hopefully this post will help you out should you have to go through this too.

Good luck.

Posted on Wednesday, February 21, 2007 10:20 PM Geek Stuff | Back to top


Comments on this post: Daylight Savings Time Changes for Windows and Java

# re: Daylight Savings Time Changes for Windows and Java
Requesting Gravatar...
Your notes helped me patch my environment, whereas the IBM official Websphere patch broke stuff. You are my hero.
Left by Jim L on Mar 07, 2007 12:08 PM

# re: Daylight Savings Time Changes for Windows and Java
Requesting Gravatar...
Thanks Jim, I'm glad I was able to help.
Left by Peter on Mar 07, 2007 12:21 PM

# re: Daylight Savings Time Changes for Windows and Java
Requesting Gravatar...
Just followed your steps, I was able to run the patch in few minutes. Thanks a lot. You are great.
Left by Ramesh on Mar 12, 2007 1:25 PM

# every 10 mints my sys time changed
Requesting Gravatar...


my sys have ms windows 2003 ,but every 10 mints,my ssytem time changed automatically ,
i changed every time but it changes automatically,
please inform me what solutions,

one more i want configure printer server how what are the steps,
please inform me
Left by sharma on Jan 24, 2008 12:18 AM

# every 10 mints my sys time changed
Requesting Gravatar...

my sys have ms windows 2003 ,but every 10 mints,my ssytem time changed automatically ,
i changed every time but it changes automatically,
please inform me what solutions,

one more i want configure printer server how what are the steps,
please inform me
Left by sharma on Jan 24, 2008 12:18 AM

Your comment:
 (will show your gravatar)


Copyright © Peter Stathakos | Powered by: GeeksWithBlogs.net