Note: This instruction is out of date. We need to update the tooling/instruction for 1.9 and beyond - 2010-03-03 Yoshito Umaoka
Do the following to update to a new timezone database.- Download the latest version of the data from ftp://elsie.nci.nih.gov/pub/
- The file you care about will look like tzdata2007g.tar.gz (with perhaps different year/letter)
- Unpack, and copy contents into {cldrdata}\tools\java\org\unicode\cldr\util\data
- Edit the file {cldrdata}\tools\java\org\unicode\cldr\util\data\tzdb-version.txt to change the version, eg for the file tzdata2007a.tar.gz, the version is 2007a.
- If you are using Eclipse, remember to refresh the project.
- Diff zone.tab with CVS.
- if any IDs in zone.tab changed name, add the mapping to org.unicode.cldr.util.ZoneParser.FIX_UNSTABLE_TZID_DATA
- The format is <new name>, <old name>
- Eg {"America/Argentina/Buenos_Aires", "America/Buenos_Aires"},
- Now Verify
- Run CountItems -Dmethod=genSupplementalZoneData to generate new data.
- Paste the <zoneFormatting> ... </zoneFormatting> into supplementalData.xml
- Paste the <variable id="$tzid" type="choice"> ... </variable> into supplementalMetadata.xml
- It also creates a file prettyPathZone.txt. Copy that to util/data/
- Produce Diffs in CVS for all three files files.
- CAREFULLY COMPARE THE RESULTS TO THE LAST VERSION FOR BOTH
- In supplementalData.xml, any changed name from zone.tab must show a diff like:
- old: <zoneItem type="Atlantic/Faeroe" territory="FO"/>
- new: <zoneItem type="Atlantic/Faeroe" territory="FO" aliases="Atlantic/Faroe"/>
- That is, the old name must not change, just add new aliases.
- In both files, any new zone.tab ID must show up, eg.
- supplementalData.xml, new: <zoneItem type="Australia/Eucla" territory="AU"/>
- supplementalMetadata.xml, new: Australia/Eucla
- REMOVE IDs. This doesn't happen very often, but requires some real thought when it does.
- If there are any $tzid's that are in the last version that are not in the current,
- find out what "real" alias it should point to. There are 2 types.
- 1. ID was removed completely, like HST. In that case, there will be no item or alias in zoneItem's.
- Look at the old supplemental data to determine what it used to map to (eg Pacific/Honolulu)
- Add to supplementalMetaData
- <zoneAlias type="HST" replacement="Pacific/Honolulu"/>
- Add ZoneParser.ADD_ZONE_ALIASES_DATA
- eg {"HST", "Pacific/Honolulu"},
- Rerun CountItems.genSupplementalZoneData()
- 2. ID is no longer in zone.tab (after fixing "A"), but is still linked.
- In that case, there will still be a zoneItem as an alias, eg
- <zoneItem type="Africa/Bamako" territory="ML" aliases="Africa/Timbuktu"/>
- Add to supplementalMetadata. Use the zoneItem info
- <zoneAlias type="Africa/Timbuktu" replacement="Pacific/Honolulu"/>
- Add to CountItems.FIX_DEPRECATED_ZONE_DATA. Example:
- Rerun CountItems.genSupplementalZoneData()
- Sometimes the aliases will be on the wrong element. If so, add to org.unicode.cldr.util.ZoneParser.PREFERRED_BASES.
- Repeat C and D until no changes occur.
- When you are all done, there should ONLY be additions to $tzid and zoneItem's.
- For any of the timezones that are added, changed, or deleted, you will need to make the appropriate metazone updates to supplemental/metazoneInfo.xml. For each zone, you will need to read the Olson TZ data file ( they are grouped by continent ), and compute the transition times ( in GMT, not local time ) for any metazone transitions. A metazone transition usually occurs when the abbreviation changes, for example, from E%sT to C%sT. If a zone is simply starting or stopping observence of DST, then usually no metazone transition is necessary. Example, going from E%sT to EST is NOT a metazone transition.
- Check in the new supplemental files and the data files in ...org\unicode\cldr\util\data
- just the data files that are already checked in (eg check in 'africa', but not 'factory')
- (Note: the code in CountItems and StandardCodes means that we have to duplicate a bit of process above, but for now it's not worth fixing.)
- Do Regenerate Charts
|
|