ICU4J Time Zone Update Utility (ICUTZU) is a utility that supplies ICU4J jar files with the latest time zone information and daylight savings time changeover dates.
The time zone data is stored in zoneinfo.res files which are generated by the ICU team using the Olson Time Zone Database (http://www.twinsun.com/tz/tz-link.htm). Every version of the time zone data corresponds directly to a version of the Olson database. For example "2006a" refers to the first refresh of the Olson database in 2006.
ICUTZU works by searching the file system for ICU4J jar files containing old time zone data, checking online for the newest time zone data and updating the ICU4J jar files accordingly. The user can choose to update from a copy of the time zone data that comes bundled with ICUTZU or from an online copy on the ICU servers.
ICUTZU will run on any system that ICU4J runs on: Solaris 5.9, 5.10, AIX 5.2, 5.3, RHEL 4, 5, Windows XP, Vista, HP-UX 9000.
ICUTZU also requires Java 1.3 or higher to be installed.
Unpack the archive into a directory of your choosing. For Unix-based systems, you will need to set permissions on runicutzu.sh:
chmod 755 runicutzu.sh
To start ICUTZU, double-click icutzu.jar or open a console and type java -jar icutzu.jar
.
Specify which paths to search and which paths to exclude from the search. By default, all drives are included in the search.
To include a path in the search, select Include from the drop-down menu, and either type the path in the text field and press enter, or simply browse for the path.
To exclude a path from the search, do the same as above, but select Exclude from the drop-down menu.
To specify whether to search subdirectories, check or uncheck the "Search Subdirectories" option.
For additional options, right-click the directory list for a context-menu.
Click Search to begin searching for updatable ICU4J jar files in the directories specified. A new window will pop up during the search with a list of updatable ICU4J jar files found.
Select which ICU4J jar files you wish to update.
ICU Version refers to the version of the ICU4J jar file itself, and TZ Version refers to version of the time zone data within the jar file.
Choose the version of time zone data to update with from the drop down list.
Click Update to begin updating the selected ICU4J jar files.
Edit the DirectorySearch.txt file and specify which paths ICUTZU will include and exclude in its search. ICUTZU searches directories recursively.
all means include all file system roots in the search (for Windows this will include all drives, for Unix-based systems this will include the root directory).
+path means to include path in the search.
-path means to exclude path in the search.
Edit the runicutzuenv.X file, where X depends on your system (.sh for Unix-based systems, .bat for Windows, .cmd for Windows NT):
JAVA_HOME: | Set this to the path where java is installed on your machine (ie. C:\Program Files\Java\jdk1.5.0 for Windows or /usr/jdk1.5.0 for Unix). |
NOGUI: | Set this to true to run in command-line mode. If set to false, ICUTZU will run in GUI mode and the DISCOVERONLY option will be ignored. |
DISCOVERONLY: | Set this to true the first time ICUTZU is run. When true, ICUTZU will build a list of updatable ICU4J jar files and save it to ICUList.txt. When false, ICUTZU will procede to update the files listed in ICUList.txt. |
SILENTPATCH: | Set this to false for normal running, or true to give no output except in the case of an error. This option does not effect the content of the log file. |
OFFLINE: | Set this to false for normal running, or true to keep ICUTZU from checking online for the latest time zone data and to use the local copy bundled with ICUTZU instead. |
Run runicutzu.X where X depends on your system (as above). This will build a list of updatable ICU4J files and save it to ICUList.txt.
Edit the runicutzuenv.X file again, and set DISCOVERONLY to false..
Run runicutzu.X again. This will update the files listed in ICUList.txt.
When updating an icu4j jar file, the original file is copied to a backup location which is reported during runtime in the console output (which can also be found in the log file).
The backup location is of the form [icutzu home]/Temp/[prefix]/[prefix]~[unique id].jar, where [prefix] is the filename of the original icu4j jar file without the .jar at the end.
The txt file in the same directory that shares the same [unique id] specifies the original location.
Example: If ICUTZU is running from c:\icutzu and updates c:\icu4j_3-6.jar, the backup will be stored in c:\icutzu\icu4j\icu4j_3-6~[unique id].jar.
The file c:\icutzu\icu4j\icu4j_3-6~[unique id].txt will contain the original path of icu4j_3-6.jar.