xref: /titanic_44/usr/src/data/zoneinfo/README.illumos (revision 17f294ad0351cdcb4a812d3c94d6486848858554)
145ba3153SMarcel Telka#
245ba3153SMarcel Telka# This file and its contents are supplied under the terms of the
345ba3153SMarcel Telka# Common Development and Distribution License ("CDDL"), version 1.0.
445ba3153SMarcel Telka# You may only use this file in accordance with the terms of version
545ba3153SMarcel Telka# 1.0 of the CDDL.
645ba3153SMarcel Telka#
745ba3153SMarcel Telka# A full copy of the text of the CDDL should have accompanied this
845ba3153SMarcel Telka# source.  A copy of the CDDL is also available via the Internet at
945ba3153SMarcel Telka# http://www.illumos.org/license/CDDL.
1045ba3153SMarcel Telka#
1145ba3153SMarcel Telka
1245ba3153SMarcel Telka#
1345ba3153SMarcel Telka# Copyright (c) 2014 Joyent, Inc.  All rights reserved.
1445ba3153SMarcel Telka#
1545ba3153SMarcel Telka
1645ba3153SMarcel TelkaHow to update the TZ database information.
1745ba3153SMarcel Telka
1845ba3153SMarcel TelkaWelcome! You've probably heard that some aspect of time has changed and
1945ba3153SMarcel Telkayou're wondering what to do. The first thing to do is to grab the latest
2045ba3153SMarcel Telkaversion of the time database which can currently be found at:
2145ba3153SMarcel Telka
2245ba3153SMarcel Telkahttp://www.iana.org/time-zones
2345ba3153SMarcel Telka
2445ba3153SMarcel TelkaYou'll need the data tarball. Most data files are used in the gate
2545ba3153SMarcel Telkadirectly; however, a few have slightly different names. The following
2645ba3153SMarcel Telkacommands assume that you're inside of the directory you extracted the
2745ba3153SMarcel Telkatime zone files.
2845ba3153SMarcel Telka
2945ba3153SMarcel Telka$ cp africa antarctica asia australasia backward etcetera europe \
3045ba3153SMarcel Telka  northamerica pacificnew southamerica systemv $CODEMGR_WS/usr/src/data/zoneinfo
3145ba3153SMarcel Telka
3245ba3153SMarcel TelkaNext you need to copy the country tab and the zone tab files. These have
3345ba3153SMarcel Telkadifferent names in our source tree.
3445ba3153SMarcel Telka
3545ba3153SMarcel Telka$ cp iso3166.tab $CODEMGR_WS/usr/src/data/zoneinfo/country.tab
3645ba3153SMarcel Telka$ cp zone.tab $CODEMGR_WS/usr/src/data/zoneinfo/zone.tab.txt
3745ba3153SMarcel Telka
389a0f2271SDominik HasslerNow, you need to manually fix up the zone_sun.tab. zone_sun.tab has
3945ba3153SMarcel Telkaadditional different zone names that the original does not. As things
4045ba3153SMarcel Telkaare changed and removed, or coordinates updated, the same should be done
4145ba3153SMarcel Telkain zone_sun.tab. The simplest way known to deal with it today is
4245ba3153SMarcel Telkasomething like the following:
4345ba3153SMarcel Telka
4445ba3153SMarcel Telka$ cd $CODEMGR_WS/usr/src/data/zoneinfo
4545ba3153SMarcel Telka$ vimdiff zone.tab.txt zone_sun.tab
4645ba3153SMarcel Telka
4745ba3153SMarcel TelkaAnd as you see things that show up as egregiously different, do a 'git
4845ba3153SMarcel Telkadiff zone.tab.txt' and see what changed and fix zone_sun.tab
4945ba3153SMarcel Telkaappropriately. Usually this means deleting removed entries and adding
5045ba3153SMarcel Telkanew ones.
5145ba3153SMarcel Telka
52*17f294adSAndy Fiddaman********** IMPORTANT **********
53*17f294adSAndy Fiddaman*** zone_sun.tab must remain sorted.
54*17f294adSAndy Fiddaman*** The upstream zone.tab.txt is not always completely in alphabetical order.
55*17f294adSAndy Fiddaman
5645ba3153SMarcel TelkaAfter that's done, you'll need to go through the more agonizing process of
5745ba3153SMarcel Telkapackaging. To do this, you'll want to look through the differences that have
5845ba3153SMarcel Telkaoccurred in zone.tab.txt and backward. The contents of backward describe
5945ba3153SMarcel Telkahardlinks that need to exist in packaging. Specifically, if you have a line in
6045ba3153SMarcel Telkathe form of:
6145ba3153SMarcel Telka
6245ba3153SMarcel TelkaLINK	Beleriand	Gondolin
6345ba3153SMarcel Telka
6445ba3153SMarcel TelkaThat instructs that Gondolin should be hardlinked to Beleriand. In ips parlance
6545ba3153SMarcel Telkathat'd be:
6645ba3153SMarcel Telka
6745ba3153SMarcel Telkahardlink path=usr/share/lib/zoneinfo/Beleriand target=./Gondolin
6845ba3153SMarcel Telka
6945ba3153SMarcel TelkaThe differences in zone.tab.txt describe the additions and removals of various
7045ba3153SMarcel Telkafile entries. If you're not friends with protocmp yet, this should help you out.
7145ba3153SMarcel TelkaOnce both of those are done, you'll need to update the version of the package
7245ba3153SMarcel Telkaitself in the manifest. IANA releases these as <year><letter>, eg. 2013i.
7345ba3153SMarcel TelkaInstead, you need to encode that letter to its spot in the alphabet. So 2013i
7445ba3153SMarcel Telkawould become 2013.9.
7545ba3153SMarcel Telka
7645ba3153SMarcel TelkaOnce packaging is all done, then you should be all set.
77