1 **********************************************************************
2 * Copyright (c) 2003-2004, International Business Machines
3 * Corporation and others. All Rights Reserved.
4 **********************************************************************
6 * Created: August 18 2003
8 **********************************************************************
10 ----------------------------------------------------------------------
13 This file describes the tools in icu/source/tools/tzcode
15 The purpose of these tools is to process the zoneinfo or "Olson" time
16 zone database into a form usable by ICU4C (release 2.8 and later).
17 Unlike earlier releases, ICU4C 2.8 supports historical time zone
18 behavior, as well as the full set of Olson compatibility IDs.
22 ICU4C: http://oss.software.ibm.com/icu/
23 Olson: ftp://elsie.nci.nih.gov/pub/
25 ----------------------------------------------------------------------
28 For ICU releases >= 2.8, both ICU4C and ICU4J implement full
29 historical time zones, based on Olson data. The implementations in C
30 and Java are somewhat different. The C implementation is a
31 self-contained implementation, whereas ICU4J uses the underlying JDK
32 1.3 or 1.4 time zone implementation.
34 Older versions of ICU (C and Java <= 2.6) implement a "present day
35 snapshot". This only reflects current time zone behavior, without
36 historical variation. Furthermore, it lacks the full set of Olson
39 ----------------------------------------------------------------------
42 The zoneinfo or "Olson" time zone package is used by various systems
43 to describe the behavior of time zones. The package consists of
46 Index of ftp://elsie.nci.nih.gov/pub/
48 classictzcode.tar.gz 65 KB 12/10/1994 12:00:00 AM
49 classictzdata.tar.gz 67 KB 12/10/1994 12:00:00 AM
50 e5+57.tar.gz 2909 KB 3/22/1993 12:00:00 AM
51 iso8601.ps.gz 16 KB 7/27/1996 12:00:00 AM
52 leastsq.xls 49 KB 4/24/1997 12:00:00 AM
53 ltroff.tar.gz 36 KB 7/16/1993 12:00:00 AM
54 pi.shar.gz 4 KB 3/9/1994 12:00:00 AM
55 tzarchive.gz 3412 KB 8/18/2003 4:00:00 AM
56 tzcode2003a.tar.gz 98 KB 3/24/2003 2:32:00 PM
57 tzdata2003a.tar.gz 132 KB 3/24/2003 2:32:00 PM
59 ICU only uses the tzcodeYYYYV.tar.gz and tzdataYYYYV.tar.gz files,
60 where YYYY is the year and V is the version letter ('a'...'z').
62 ----------------------------------------------------------------------
65 1. Obtain the current versions of tzcodeYYYYV.tar.gz (aka `tzcode')
66 and tzdataYYYYV.tar.gz (aka `tzdata') from the FTP site given
67 above. Either manually download or use wget:
69 $ cd {path_to}/icu/source/tools/tzcode
70 $ wget "ftp://elsie.nci.nih.gov/pub/tz*.tar.gz"
72 2. Unpack tzcode and tzdata directly into the directory tzcode:
74 $ tar xzvf tzcode*.tar.gz
75 $ tar xzvf tzdata*.tar.gz
77 *** Make sure you only have ONE FILE named tzdata*.tar.gz in the
79 *** Do NOT delete the tzdata*.tar.gz file.
81 The Makefile looks in the current directory to determine the
82 version of Olson data it is building by looking for tzdata*.tar.gz.
84 3. Apply the ICU patch to zic.c:
86 $ patch < patch-icu-tzcode
88 If patch complains at this point, there is a mismatch that must be
89 manually addressed. See the CVS log of `patch-icu-tzcode' for
96 5. Copy the data files to the correct location in the ICU4C/ICU4J
99 $ cp zoneinfo.txt ../../../data/misc/
100 $ cp ZoneMetaData.java {path_to}/icu4j/src/com/ibm/icu/impl
107 7. Don't forget to check in the new zoneinfo.txt (from its location at
108 {path_to}/icu/source/data/misc/zoneinfo.txt) into CVS.
110 ----------------------------------------------------------------------
111 HOWTO regenerate patch-icu-tzcode
113 If you need to edit any of the tzcode* files, you will need to
114 regenerate the patch file as follows.
116 1. Follow the above instructions to extract and patch the tzcode*
117 files in {path_to}/icu/source/tools/tzcode. Modify any of the
120 2. Extract a clean set of the tzcode* files into a new directory,
123 $ mkdir ../tzcode.orig
125 $ tar xzf ../tzcode/tzcode*.tar.gz
128 3. Compute diffs, ignoring files that are in only one directory:
130 $ diff -ur ../tzcode.orig . | grep -vE -e "^Only in " > patch-icu-tzcode
132 4. Test the patch-icu-tzcode file by regenerating and diffing the
133 files again in another directory. The expected output from the
134 final diff command is *nothing*.
136 $ mkdir ../tzcode.new
138 $ tar xzf ../tzcode/tzcode*.tar.gz
139 $ patch < ../tzcode/patch-icu-tzcode
141 $ diff -ur ../tzcode.new . | grep -vE -e "^Only in "
143 5. Check in the new patch-icu-tzcode file.
145 ----------------------------------------------------------------------