Skip to main content

Software  >  WebSphere  >  

Guidance on updating Java SDKs and JREs for Daylight Saving Time (DST) changes

 Flash (Alert)
 
Abstract

Sometimes countries change their Daylight Saving Time (DST) start and end dates. Original DST start and end dates programmed into operating systems and into Java™ software will be incorrect. As a result, operating systems and Java installations need to be updated.
 
Content

How do DST changes affect my system?
When do I need to update my system?
I need to update straight away. What must I do?
How do I validate DST changes?


How do DST changes affect my system?


Java applications that are sensitive to time and date information will require updating to ensure that all relevant time and date calculations are correct. Many IBM products contain Java technology and are affected by these changes.


When do I need to update my system?

The latest DST information is included in new product service refreshes and your systems will be updated as part of your planned maintenance schedule. You need to update your systems ahead of this schedule only if you are affected by recent DST changes.

Consider the following:

  • Do you run Java applications that perform time and date processing?
  • Is it important for your applications to function correctly on the affected dates? Consider the risks to your business and your customers business if your applications calculate time incorrectly.
  • Are the countries significant to your business changing their DST?
  • Does your system already contain DST updates for the countries significant to your business?

To see which time zone updates are included in Java SDK or JRE service refreshes, see Olson time zone updates for Java JRE and SDK service refreshes for IBM products.

To search for SDKs and JREs on your system and see the current update level, see How do I validate DST changes?


I need to update straight away. What must I do?

For your Java applications to work correctly with the new DST updates, you must update both your operating system and your Java SDK and JRE. Java relies on the operating system to provide an accurate clock and it relies on locale information to indicate the active time zone. Inaccurate settings will cause Java to represent time incorrectly.

For your Java applications to work correctly with the new DST updates, you must update both your operating system and your Java SDK and JRE.


Updating your operating system

The update process you must follow depends on your operating system.



Updating your Java SDKs and JREs

You might have more than one SDK or JRE on your system that needs updating. Follow these steps until you find a suitable update method for each SDK or JRE.

1.Java on IBM i
See Updating Java for Daylight Time Saving changes on IBM i platforms.
2.Java embedded in an IBM product, including JDKs supplied by IBM for products on Solaris or HP-UX.
Consult the product support pages. Where possible, use a product specific patch to update your SDK or JRE.
3.Java provided with your operating system
For Java on AIX and z/OS, see the support pages for your operating system. For other platforms, follow the instructions in the next step.
4.Java installed separately
If your SDK or JRE was downloaded from IBM DeveloperWorks or supplied by a Linux distributor, install the latest Java service refresh. For information about the level of Java required, see Olson time zone updates for Java JRE and SDK service refreshes for IBM products.
You can download Java from developerWorks.
5.If IBM product service or a Java service refresh is not yet available for the country updates you need,
or
If you are using the
IBM 32-bit Runtime Environment for Java 2 (JRE) Windows Edition on IBM Personal Computing products manufactured prior to 1 Apr 2005,
or
If you are using the IBM Development Package for Eclipse.

Use the IBM Time Zone Update utility for Java (JTZU), which applies the latest time zone update information directly to IBM Java SDKs and JREs. For more information and to download JTZU, see IBM Time Zone Update Utility for Java Download Page .
6.If you are using an obsolete version of Java
Upgrade to a supported level of the IBM product or the Java SDK or JRE.



Deciding between applying service and using JTZU

Update your IBM SDK or JRE by applying a Java Service Refresh, Fix Pack or interim fix. However, there are some situations when this might not be possible, for example:

  • You require DST updates for countries not yet covered by the Service Refresh, Fix Pack, or interim fix.
  • You require DST updates ahead of your maintenance schedule and cannot bring the schedule forward.
  • You have applied an interim fix for an essential "custom" service and you want to avoid reverting the interim fix.
In these circumstances you can use JTZU to update your IBM SDK or JRE.

Note: JTZU does not support Java on IBM i platforms. To apply Daylight Saving Time changes to Java on IBM i systems, see Updating Java for Daylight Time Saving changes on IBM i platforms.




How do I validate DST changes?

After updating your system, you can validate the changes to a Java SDK or JRE by using JTZU or by running a test case using the SDK or JRE.

Using JTZU

Running JTZU in DISCOVERONLY mode will search your system for IBM JREs and SDKs. All JREs and SDKs found are listed in the SDKList.txt file, including their current Olson time zone update level. To see which time zone updates are included, see Olson time zone updates for Java JRE and SDK service refreshes for IBM products.

For more information and to download JTZU, see IBM Time Zone Update Utility for Java Download Page .


Using the TimeTest test case to test Java

The TimeTest test case uses known DST dates to confirm your SDK or JRE has been updated successfully.

Run the TimeTest test case using the SDK or JRE to be tested;

java -jar TimeTest-<version>.jar

The test case displays JVM information and DST update information.

Using the TimeTest test case to test both Java and the operating system

The TimeTest test case displays both UTC and local time every five seconds. You must update both your operating system and your SDK or JRE before this test case will succeed.

1. Run the TimeTest test case using the SDK or JRE to be tested;

java -jar TimeTest-<version>.jar

2. Confirm the information relates to the SDK or JRE you are testing.
3. Change the system clock to just before the expected start of DST.
4. Wait until the clock changes. Check that the output of the TimeTest test case is adjusted correctly.
5. Change the system clock to just before the expected end of DST.
6. Wait until the clock changes. Check that the output of the TimeTest test case is adjusted correctly.
7. Change the system clock back to today's time and date.

You can download TimeTest.jar below. Last updated 23 Sep 2007.

Using the more verbose test cases

These test cases are suitable for problem diagnosis as well as confirming DST updates have been successful.
Check Java time zone settings for Daylight Saving Time




Change History
10 Nov 2009Updated references to IBM i
13 Jul 2009Updated links to Olson time zone page
15 May 2009Editorial updates
6 April 2009Changed links provided to remove links to archived document (SWG21250511)
10 Nov 2008Added Java 6.0 to choice table
23 Sep 2007Update to TimeTest.jar for JTZU 1.3.7g
19 Sep 2007Update to TimeTest.jar
19 Aug 2007Generalise document to provide information for future DST changes.
02 Mar 2007Link to more test cases.
21 Feb 2007Fix to TimeTest. Using Perth for Australia instead of Sydney, as Sydney is in New South Wales.
20 Feb 2007New version of TimeTest.jar. Works on 1.3.1, reports more information.
16 Feb 2007Add information on running TimeTest.jar
15 Feb 2007Added information about when you have a choice between service and JTZU
23 Jan 2007Added table of Java update methods
13 Dec 2006Initial publication
 
Related information
Changes to Daylight Saving Time and the impact on Java
Olson Time Zone updates for Java SDK/ JRE service refre
IBM Time Zone Update Utility for Java (JTZU) download
Updating Java for Daylight Saving Time on IBM i
Java DST known problems and workarounds
 
TimeTest-20070923.jar
 
 

Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.
Rate this page
Please take a moment to complete this form to help us better serve you.
This material provides me with the information I need.




This material is clear and easy to understand.




Did the information help you to achieve your goal?
What updates, improvements, or related information would you like to see in this document?
Your response will be used to improve our document content. Requests for assistance, if applicable, should be submitted through your normal support channel as we cannot respond from this site.
Input the verification number to submit feedback:
Document information
 Product categories:
 Software
 Application Servers
 Distributed Application Support
 Runtimes for Java Technology
 DST
 Operating system(s):
  AIX, HP-UX, Linux, Solaris, Windows, z/OS
 Software version:
  1.4.2, 5.0, 6.0
 Reference #:
  1251761
 IBM Group:
 Software Group
 Modified date:
 2008-11-12

Translate My Page
 
 

Rate this page

Help us improve this page. Your response will be used to improve our document content. Requests for assistance, if applicable, should be submitted through your normal support channel as we cannot respond from this site.