/* INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS SOFTWARE ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE WARRANTY OF NON-INFRINGEMENT AND THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF THIS SOFTWARE. IBM HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATION TO THE SOFTWARE.*/ ============================================================================== File: Readme.txt accompanies DSTTest.zip Creator: IBM Inc. Date: 22 February 2007 ============================================================================== Provided by IBM Support as is to help customers evaluate their Daylight Saving Time (DST) configurations. Changes to DST in 2007 in the US, Canada, Bermuda, Bahamas, and potentially other countries require action on most systems. DSTTest includes the following tools to help you evaluate your Java environments for DST readiness: - DSTTest: Tests whether specific dates/times are Daylight Saving Time or not - ListCurrentDSTRules: Lists the current rules for all time zones known to the JRE - ListTimeZoneAliases: Lists all time zone aliases known to the JRE - ListDSTChangeDetails: Lists detailed historical and future DST changes Runtimes for Java Technology Support page on ibm.com: http://www.ibm.com/software/webservers/appserv/runtimes/support/ Download DSTTest.zip from ibm.com: http://www.ibm.com/support/docview.wss?rs=3068&uid=swg24014974 For more information about DST and IBM Java: http://www.ibm.com/support/docview.wss?rs=3068&uid=swg21251761 ============================================================================== Installation instructions 1. Download DSTtest.zip into a temporary directory. 2. Unzip DSTtest.zip; a DSTTest directory will be created. Set up instructions: 1. Select a JRE to test. Typically, these will be Java executables for the applications you are upgrading for Daylight Saving Time. If you are not sure which Java to test: - If Java is in your PATH - UNIX: which java If nothing is returned, the java executable is not in your path - Windows: java -version If error message returned is: "'java' is not recognized..." then the java executable is not in your path - Search: - UNIX: find / -name java -print - Windows: Select "Start"->"Search" and search for "java.exe" 2. Open a new command prompt/windows 3. Set environment to point to appropriate Java SDK - UNIX (Bourne/Korn/Bash shells): export JAVA_HOME= For example, export JAVA_HOME=/usr/IBM/WebSphere/AppServer/java - UNIX (csh): setenv JAVA_HOME For example, setenv JAVA_HOME /usr/IBM/WebSphere/AppServer/java - Windows: set JAVA_HOME= For example, SET JAVA_HOME="C:\Program Files\IBM\Java50" 4. Set PATH to point to appropriate Java SDK - UNIX (Bourne/Korn/Bash shells): export PATH=$PATH: For example, export PATH=$PATH:/usr/IBM/WebSphere/AppServer/java/jre/bin - UNIX (csh shell): setenv PATH=$(PATH): For example, setenv PATH $(PATH):/usr/IBM/WebSphere/AppServer/java/jre/bin - Windows: set JAVA_HOME= For example, SET JAVA_HOME="C:\Program Files\IBM\Java50" 5. Set classpath to include DSTTest.jar - UNIX (Bourne/Korn/Bash shells): export CLASSPATH=$CLASSPATH:./DSTTest.jar - UNIX (csh shell): setenv CLASSPATH $(CLASSPATH):./DSTTest.jar - Windows: set CLASSPATH=%CLASSPATH%;DSTTest.jar ============================================================================== Usage instructions IBM provides the following scripts to simplify invoking these tools for testing your that Daylight Saving Time is included: Timezone validation scripts: These scripts are already customized for impacted timezones and invoke the testDST script to test a sampling of dates and times to show you if the Daylight Saving Time fix is installed. Verifies environment variables are set. - testBrazil: Tests the BET timezone for Brazil - testCanada: Tests the Saint_Johns timezone in Canada - testUSA: Tests the Central timezone, using Chicago as example - testWAust: Tests the timezone for Perth in Australia Other utilities: - dumpDetails: Checks JAVA_HOME, then calls ListDSTChangeDetails tool. - listTZAlias: Checks JAVA_HOME, then calls ListTimeZoneAlias tool. - showRules: Checks JAVA_HOME, then calls ListCurrentDSTRules tool. - testDST: Checks JAVA_HOME, then calls TestDST tool. ============================================================================== Tool details DSTTest DSTTest is used to test whether specific date/times are Daylight Saving Time. It reads time zone information, and a list of dates from an input file and determines whether each is in Daylight Saving Time. Usage: java DSTTest Input filename format: Where: - is a long name listed in the Olsen timezone database, such as "America/Chicago" - is a date and time pattern string as defined by java.text.SimpleDateFormat - is one or more dates to be tested. They are added to the file in the . - Lines beginning with '#' are treated as comments and ignored. For instance, a simple input file might look like: America/Chicago MM/dd/yyyy HH:mm # this one should return false in a jre1.4 or higher 03/11/2006 03:00 # this one should return true. 03/11/2007 03:00 Sample input files are included (*.dates). Output is the input date read from the file followed by "DST active" if DST is active for the date, or nothing if it is not. Example Output: ... Sat Mar 08 03:00:00 CST 2008 Sun Mar 09 03:00:00 CDT 2008:DST active ------------------------------------------------------------------------------ ListCurrentDSTRules ListCurrentDSTRules will list the current rules for all times zones known to the JRE. There is no input and output is to stdout. Typically, stdout is redirected to a file. Usage: java ListCurrentDSTRules > myJREsDST.html After "myJREsDTS.html" is created, open the resulting file in a browser. Starting in with JDK 1.4 the TimeZone class maintains an historical list of time zone changes, and scheduled future changes. This program only displays the *current* SimpleTimeZone rule associated with each time zone. It does not display historic or future Daylight Saving Time changes associated with the time zone. This program has not been rigorously tested, and is provided "as-is". If you believe a rule is being reported incorrectly, you can use DSTTest to check actual behavior. ------------------------------------------------------------------------------ ListTimeZoneAliases ListTimeZoneAliases will list all time zone aliases known to the JRE, or all time zones with a specified GMT offset. Usage: java ListTimeZoneAliases [help|all|GMT<+|->n] The default is to print this help message Example: java ListTimeZoneAliases GMT+5 would list all time zone aliases with a nominal offset of 5 hours from GMT ------------------------------------------------------------------------------ ListDSTChangeDetails ListDSTChangeDetails will list detailed historical and future Daylight Saving Time change. Usage: java ListDSTChangeDetails [help|all|