xref: /titanic_52/usr/src/data/zoneinfo/README.illumos (revision a29e56d91db891741f1af9f6bbd3e3c3cac5f19b)
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 manually 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
52********** IMPORTANT **********
53*** zone_sun.tab must remain sorted.
54*** The upstream zone.tab.txt is not always completely in alphabetical order.
55
56After that's done, you'll need to go through the more agonizing process of
57packaging. To do this, you'll want to look through the differences that have
58occurred in zone.tab.txt and backward. The contents of backward describe
59hardlinks that need to exist in packaging. Specifically, if you have a line in
60the form of:
61
62LINK	Beleriand	Gondolin
63
64That instructs that Gondolin should be hardlinked to Beleriand. In ips parlance
65that'd be:
66
67hardlink path=usr/share/lib/zoneinfo/Beleriand target=./Gondolin
68
69The differences in zone.tab.txt describe the additions and removals of various
70file entries. If you're not friends with protocmp yet, this should help you out.
71Once both of those are done, you'll need to update the version of the package
72itself in the manifest. IANA releases these as <year><letter>, eg. 2013i.
73Instead, you need to encode that letter to its spot in the alphabet. So 2013i
74would become 2013.9.
75
76Once packaging is all done, then you should be all set.
77