xref: /illumos-gate/usr/src/data/zoneinfo/README.illumos (revision 03270635d68df6a0392fb8f4b7c04acad764648b)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright (c) 2014 Joyent, Inc.  All rights reserved.
14#
15
16How to update the TZ database information.
17
18Welcome! You've probably heard that some aspect of time has changed and
19you're wondering what to do. The first thing to do is to grab the latest
20version of the time database which can currently be found at:
21
22http://www.iana.org/time-zones
23
24You'll need the data tarball. Most data files are used in the gate
25directly; however, a few have slightly different names. The following
26commands assume that you're inside of the directory you extracted the
27time zone files.
28
29$ cp africa antarctica asia australasia backward etcetera europe \
30  northamerica pacificnew southamerica systemv $CODEMGR_WS/usr/src/data/zoneinfo
31
32Next you need to copy the country tab and the zone tab files. These have
33different names in our source tree.
34
35$ cp iso3166.tab $CODEMGR_WS/usr/src/data/zoneinfo/country.tab
36$ cp zone.tab $CODEMGR_WS/usr/src/data/zoneinfo/zone.tab.txt
37
38Now, you need to manaully fix up the zone_sun.tab. zone_sun.tab has
39additional different zone names that the original does not. As things
40are changed and removed, or coordinates updated, the same should be done
41in zone_sun.tab. The simplest way known to deal with it today is
42something like the following:
43
44$ cd $CODEMGR_WS/usr/src/data/zoneinfo
45$ vimdiff zone.tab.txt zone_sun.tab
46
47And as you see things that show up as egregiously different, do a 'git
48diff zone.tab.txt' and see what changed and fix zone_sun.tab
49appropriately. Usually this means deleting removed entries and adding
50new ones.
51
52After that's done, you'll need to go through the more agonizing process of
53packaging. To do this, you'll want to look through the differences that have
54occurred in zone.tab.txt and backward. The contents of backward describe
55hardlinks that need to exist in packaging. Specifically, if you have a line in
56the form of:
57
58LINK	Beleriand	Gondolin
59
60That instructs that Gondolin should be hardlinked to Beleriand. In ips parlance
61that'd be:
62
63hardlink path=usr/share/lib/zoneinfo/Beleriand target=./Gondolin
64
65The differences in zone.tab.txt describe the additions and removals of various
66file entries. If you're not friends with protocmp yet, this should help you out.
67Once both of those are done, you'll need to update the version of the package
68itself in the manifest. IANA releases these as <year><letter>, eg. 2013i.
69Instead, you need to encode that letter to its spot in the alphabet. So 2013i
70would become 2013.9.
71
72Once packaging is all done, then you should be all set.
73