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