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