xref: /titanic_50/usr/src/data/zoneinfo/README.illumos (revision 8d161de10aa6bee767dbaf9ebd2d284c5b551fa7)
15d0e1406SMarcel Telka#
25d0e1406SMarcel Telka# This file and its contents are supplied under the terms of the
35d0e1406SMarcel Telka# Common Development and Distribution License ("CDDL"), version 1.0.
45d0e1406SMarcel Telka# You may only use this file in accordance with the terms of version
55d0e1406SMarcel Telka# 1.0 of the CDDL.
65d0e1406SMarcel Telka#
75d0e1406SMarcel Telka# A full copy of the text of the CDDL should have accompanied this
85d0e1406SMarcel Telka# source.  A copy of the CDDL is also available via the Internet at
95d0e1406SMarcel Telka# http://www.illumos.org/license/CDDL.
105d0e1406SMarcel Telka#
115d0e1406SMarcel Telka
125d0e1406SMarcel Telka#
135d0e1406SMarcel Telka# Copyright (c) 2014 Joyent, Inc.  All rights reserved.
145d0e1406SMarcel Telka#
155d0e1406SMarcel Telka
165d0e1406SMarcel TelkaHow to update the TZ database information.
175d0e1406SMarcel Telka
185d0e1406SMarcel TelkaWelcome! You've probably heard that some aspect of time has changed and
195d0e1406SMarcel Telkayou're wondering what to do. The first thing to do is to grab the latest
205d0e1406SMarcel Telkaversion of the time database which can currently be found at:
215d0e1406SMarcel Telka
225d0e1406SMarcel Telkahttp://www.iana.org/time-zones
235d0e1406SMarcel Telka
245d0e1406SMarcel TelkaYou'll need the data tarball. Most data files are used in the gate
255d0e1406SMarcel Telkadirectly; however, a few have slightly different names. The following
265d0e1406SMarcel Telkacommands assume that you're inside of the directory you extracted the
275d0e1406SMarcel Telkatime zone files.
285d0e1406SMarcel Telka
295d0e1406SMarcel Telka$ cp africa antarctica asia australasia backward etcetera europe \
305d0e1406SMarcel Telka  northamerica pacificnew southamerica systemv $CODEMGR_WS/usr/src/data/zoneinfo
315d0e1406SMarcel Telka
325d0e1406SMarcel TelkaNext you need to copy the country tab and the zone tab files. These have
335d0e1406SMarcel Telkadifferent names in our source tree.
345d0e1406SMarcel Telka
355d0e1406SMarcel Telka$ cp iso3166.tab $CODEMGR_WS/usr/src/data/zoneinfo/country.tab
365d0e1406SMarcel Telka$ cp zone.tab $CODEMGR_WS/usr/src/data/zoneinfo/zone.tab.txt
375d0e1406SMarcel Telka
389047ba7fSDominik HasslerNow, you need to manually fix up the zone_sun.tab. zone_sun.tab has
395d0e1406SMarcel Telkaadditional different zone names that the original does not. As things
405d0e1406SMarcel Telkaare changed and removed, or coordinates updated, the same should be done
415d0e1406SMarcel Telkain zone_sun.tab. The simplest way known to deal with it today is
425d0e1406SMarcel Telkasomething like the following:
435d0e1406SMarcel Telka
445d0e1406SMarcel Telka$ cd $CODEMGR_WS/usr/src/data/zoneinfo
455d0e1406SMarcel Telka$ vimdiff zone.tab.txt zone_sun.tab
465d0e1406SMarcel Telka
475d0e1406SMarcel TelkaAnd as you see things that show up as egregiously different, do a 'git
485d0e1406SMarcel Telkadiff zone.tab.txt' and see what changed and fix zone_sun.tab
495d0e1406SMarcel Telkaappropriately. Usually this means deleting removed entries and adding
505d0e1406SMarcel Telkanew ones.
515d0e1406SMarcel Telka
52*8d161de1SAndy Fiddaman********** IMPORTANT **********
53*8d161de1SAndy Fiddaman*** zone_sun.tab must remain sorted.
54*8d161de1SAndy Fiddaman*** The upstream zone.tab.txt is not always completely in alphabetical order.
55*8d161de1SAndy Fiddaman
565d0e1406SMarcel TelkaAfter that's done, you'll need to go through the more agonizing process of
575d0e1406SMarcel Telkapackaging. To do this, you'll want to look through the differences that have
585d0e1406SMarcel Telkaoccurred in zone.tab.txt and backward. The contents of backward describe
595d0e1406SMarcel Telkahardlinks that need to exist in packaging. Specifically, if you have a line in
605d0e1406SMarcel Telkathe form of:
615d0e1406SMarcel Telka
625d0e1406SMarcel TelkaLINK	Beleriand	Gondolin
635d0e1406SMarcel Telka
645d0e1406SMarcel TelkaThat instructs that Gondolin should be hardlinked to Beleriand. In ips parlance
655d0e1406SMarcel Telkathat'd be:
665d0e1406SMarcel Telka
675d0e1406SMarcel Telkahardlink path=usr/share/lib/zoneinfo/Beleriand target=./Gondolin
685d0e1406SMarcel Telka
695d0e1406SMarcel TelkaThe differences in zone.tab.txt describe the additions and removals of various
705d0e1406SMarcel Telkafile entries. If you're not friends with protocmp yet, this should help you out.
715d0e1406SMarcel TelkaOnce both of those are done, you'll need to update the version of the package
725d0e1406SMarcel Telkaitself in the manifest. IANA releases these as <year><letter>, eg. 2013i.
735d0e1406SMarcel TelkaInstead, you need to encode that letter to its spot in the alphabet. So 2013i
745d0e1406SMarcel Telkawould become 2013.9.
755d0e1406SMarcel Telka
765d0e1406SMarcel TelkaOnce packaging is all done, then you should be all set.
77