xref: /illumos-gate/usr/src/data/zoneinfo/README.illumos (revision 251a62bcb8f02bf0421d03de4ad180a37416657d)
1503609a9SYuri Pankov#
2503609a9SYuri Pankov# This file and its contents are supplied under the terms of the
3503609a9SYuri Pankov# Common Development and Distribution License ("CDDL"), version 1.0.
4503609a9SYuri Pankov# You may only use this file in accordance with the terms of version
5503609a9SYuri Pankov# 1.0 of the CDDL.
6503609a9SYuri Pankov#
7503609a9SYuri Pankov# A full copy of the text of the CDDL should have accompanied this
8503609a9SYuri Pankov# source.  A copy of the CDDL is also available via the Internet at
9503609a9SYuri Pankov# http://www.illumos.org/license/CDDL.
10503609a9SYuri Pankov#
11503609a9SYuri Pankov
12503609a9SYuri Pankov#
13503609a9SYuri Pankov# Copyright (c) 2014 Joyent, Inc.  All rights reserved.
14503609a9SYuri Pankov#
15503609a9SYuri Pankov
16503609a9SYuri PankovHow to update the TZ database information.
17503609a9SYuri Pankov
18503609a9SYuri PankovWelcome! You've probably heard that some aspect of time has changed and
19503609a9SYuri Pankovyou're wondering what to do. The first thing to do is to grab the latest
20503609a9SYuri Pankovversion of the time database which can currently be found at:
21503609a9SYuri Pankov
22503609a9SYuri Pankovhttp://www.iana.org/time-zones
23503609a9SYuri Pankov
24503609a9SYuri PankovYou'll need the data tarball. Most data files are used in the gate
25503609a9SYuri Pankovdirectly; however, a few have slightly different names. The following
26503609a9SYuri Pankovcommands assume that you're inside of the directory you extracted the
27503609a9SYuri Pankovtime zone files.
28503609a9SYuri Pankov
29503609a9SYuri Pankov$ cp africa antarctica asia australasia backward etcetera europe \
30503609a9SYuri Pankov  northamerica pacificnew southamerica systemv $CODEMGR_WS/usr/src/data/zoneinfo
31503609a9SYuri Pankov
32503609a9SYuri PankovNext you need to copy the country tab and the zone tab files. These have
33503609a9SYuri Pankovdifferent names in our source tree.
34503609a9SYuri Pankov
35503609a9SYuri Pankov$ cp iso3166.tab $CODEMGR_WS/usr/src/data/zoneinfo/country.tab
36503609a9SYuri Pankov$ cp zone.tab $CODEMGR_WS/usr/src/data/zoneinfo/zone.tab.txt
37503609a9SYuri Pankov
38*251a62bcSDominik HasslerNow, you need to manually fix up the zone_sun.tab. zone_sun.tab has
39503609a9SYuri Pankovadditional different zone names that the original does not. As things
40503609a9SYuri Pankovare changed and removed, or coordinates updated, the same should be done
41503609a9SYuri Pankovin zone_sun.tab. The simplest way known to deal with it today is
42503609a9SYuri Pankovsomething like the following:
43503609a9SYuri Pankov
44503609a9SYuri Pankov$ cd $CODEMGR_WS/usr/src/data/zoneinfo
45503609a9SYuri Pankov$ vimdiff zone.tab.txt zone_sun.tab
46503609a9SYuri Pankov
47503609a9SYuri PankovAnd as you see things that show up as egregiously different, do a 'git
48503609a9SYuri Pankovdiff zone.tab.txt' and see what changed and fix zone_sun.tab
49503609a9SYuri Pankovappropriately. Usually this means deleting removed entries and adding
50503609a9SYuri Pankovnew ones.
51503609a9SYuri Pankov
52503609a9SYuri PankovAfter that's done, you'll need to go through the more agonizing process of
53503609a9SYuri Pankovpackaging. To do this, you'll want to look through the differences that have
54503609a9SYuri Pankovoccurred in zone.tab.txt and backward. The contents of backward describe
55503609a9SYuri Pankovhardlinks that need to exist in packaging. Specifically, if you have a line in
56503609a9SYuri Pankovthe form of:
57503609a9SYuri Pankov
58503609a9SYuri PankovLINK	Beleriand	Gondolin
59503609a9SYuri Pankov
60503609a9SYuri PankovThat instructs that Gondolin should be hardlinked to Beleriand. In ips parlance
61503609a9SYuri Pankovthat'd be:
62503609a9SYuri Pankov
63503609a9SYuri Pankovhardlink path=usr/share/lib/zoneinfo/Beleriand target=./Gondolin
64503609a9SYuri Pankov
65503609a9SYuri PankovThe differences in zone.tab.txt describe the additions and removals of various
66503609a9SYuri Pankovfile entries. If you're not friends with protocmp yet, this should help you out.
67503609a9SYuri PankovOnce both of those are done, you'll need to update the version of the package
68503609a9SYuri Pankovitself in the manifest. IANA releases these as <year><letter>, eg. 2013i.
69503609a9SYuri PankovInstead, you need to encode that letter to its spot in the alphabet. So 2013i
70503609a9SYuri Pankovwould become 2013.9.
71503609a9SYuri Pankov
72503609a9SYuri PankovOnce packaging is all done, then you should be all set.
73