15a80fb27SWolfram Schneider.\" Copyright (c) 1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. 25a80fb27SWolfram Schneider.\" All rights reserved. 38eeb71d7SWolfram Schneider.\" 45a80fb27SWolfram Schneider.\" Redistribution and use in source and binary forms, with or without 55a80fb27SWolfram Schneider.\" modification, are permitted provided that the following conditions 65a80fb27SWolfram Schneider.\" are met: 75a80fb27SWolfram Schneider.\" 1. Redistributions of source code must retain the above copyright 85a80fb27SWolfram Schneider.\" notice, this list of conditions and the following disclaimer. 95a80fb27SWolfram Schneider.\" 2. Redistributions in binary form must reproduce the above copyright 105a80fb27SWolfram Schneider.\" notice, this list of conditions and the following disclaimer in the 115a80fb27SWolfram Schneider.\" documentation and/or other materials provided with the distribution. 128eeb71d7SWolfram Schneider.\" 135a80fb27SWolfram Schneider.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 145a80fb27SWolfram Schneider.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 155a80fb27SWolfram Schneider.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 165a80fb27SWolfram Schneider.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 175a80fb27SWolfram Schneider.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 185a80fb27SWolfram Schneider.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 195a80fb27SWolfram Schneider.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 205a80fb27SWolfram Schneider.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 215a80fb27SWolfram Schneider.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 225a80fb27SWolfram Schneider.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 235a80fb27SWolfram Schneider.\" SUCH DAMAGE. 245a80fb27SWolfram Schneider.\" 2597d92980SPeter Wemm.\" $FreeBSD$ 265d279e65SAttilio Rao.Dd July 4, 2009 278eeb71d7SWolfram Schneider.Dt TZSETUP 8 28a4c37c81SRuslan Ermilov.Os 298eeb71d7SWolfram Schneider.Sh NAME 308eeb71d7SWolfram Schneider.Nm tzsetup 318eeb71d7SWolfram Schneider.Nd set local timezone 32342afc34SPhilippe Charnier.Sh SYNOPSIS 33e97407b4SRuslan Ermilov.Nm 34ada5f18aSEdwin Groothuis.Op Fl nrs 35b8926904SEdwin Groothuis.Op Ar zoneinfo file 36342afc34SPhilippe Charnier.Sh DESCRIPTION 37239e57d0SGarrett WollmanThe 38342afc34SPhilippe Charnier.Nm 39490d5836SPhilippe Charnierutility reads a database of timezone information and presents a menu 40239e57d0SGarrett Wollmanallowing the user to select a specific zone without knowing the details 4107bfccd7SRuslan Ermilovof the database layout. 4207bfccd7SRuslan ErmilovThe selected zone is installed as the system 43239e57d0SGarrett Wollmandefault zone. 44490d5836SPhilippe CharnierThe 45239e57d0SGarrett Wollman.Nm 46490d5836SPhilippe Charnierutility also determines whether any adjustment is necessary for systems where 47239e57d0SGarrett Wollmanthe hardware clock does not keep 48239e57d0SGarrett Wollman.Tn UTC . 49342afc34SPhilippe Charnier.Pp 50342afc34SPhilippe CharnierThe following option is available: 51239e57d0SGarrett Wollman.Bl -tag -offset indent -width Fl 52342afc34SPhilippe Charnier.It Fl n 53239e57d0SGarrett WollmanDo not create or copy files. 54ada5f18aSEdwin Groothuis.It Fl r 55ada5f18aSEdwin GroothuisReinstall the zoneinfo file installed last time. The name is obtained from 56ada5f18aSEdwin Groothuis.Pa /var/db/zoneinfo . 575d279e65SAttilio Rao.It Fl s 585d279e65SAttilio RaoSkip the initial question about adjusting the clock if not set to 595d279e65SAttilio Rao.Tn UTC . 60342afc34SPhilippe Charnier.El 61239e57d0SGarrett Wollman.Pp 62b8926904SEdwin GroothuisIt is possible to short-circuit the menu system by specifying the 63b8926904SEdwin Groothuislocation of a 64b8926904SEdwin Groothuis.Ar zoneinfo file 65b8926904SEdwin Groothuison the command line; this is intended mainly for pre-configured installation 66b8926904SEdwin Groothuisscripts. 67239e57d0SGarrett Wollman.Sh TIMEZONE DATABASE 68239e57d0SGarrett WollmanThe contents of the timezone database are indexed by 69239e57d0SGarrett Wollman.Pa /usr/share/zoneinfo/zone.tab . 70239e57d0SGarrett WollmanThis file lists, for each timezone data file, the 71239e57d0SGarrett Wollman.Tn ISO 72239e57d0SGarrett Wollman3166 territory code, approximate geographical coordinates 73c4d9468eSRuslan Ermilov(in 74c4d9468eSRuslan Ermilov.Tn ISO 75c4d9468eSRuslan Ermilov6709 format), 76239e57d0SGarrett Wollmanand location within the territory. 77239e57d0SGarrett Wollman.Pp 78239e57d0SGarrett WollmanThe maintainers of the database maintain the following policies: 79239e57d0SGarrett Wollman.Bl -enum -offset indent 80239e57d0SGarrett Wollman.It 81239e57d0SGarrett WollmanAt least one zone for every country or inhabited geographical territory. 82239e57d0SGarrett Wollman.It 83239e57d0SGarrett WollmanOne zone for every distinct, documented timezone history since the 84239e57d0SGarrett Wollmanbeginning of the 85239e57d0SGarrett Wollman.Ux 86239e57d0SGarrett Wollmanepoch (January 1, 1970, 87239e57d0SGarrett Wollman.Tn GMT ) . 88239e57d0SGarrett Wollman.It 8907bfccd7SRuslan ErmilovEach zone is named for the most populous city therein. 9007bfccd7SRuslan Ermilov(Where possible, 91239e57d0SGarrett Wollmanthe database includes pre-1970 history for its city.) 92239e57d0SGarrett Wollman.El 93239e57d0SGarrett WollmanThe source code to the database 94239e57d0SGarrett Wollman.Pq Pa /usr/src/share/zoneinfo/[a-z]* 95239e57d0SGarrett Wollmancontains many additional comments and documentation references for the 96239e57d0SGarrett Wollmanhistorically minded. 978eeb71d7SWolfram Schneider.Sh FILES 98239e57d0SGarrett Wollman.Bl -tag -width /usr/share/zoneinfo/zone.tab -compact 998eeb71d7SWolfram Schneider.It Pa /etc/localtime 1008eeb71d7SWolfram Schneidercurrent time zone file 1018eeb71d7SWolfram Schneider.It Pa /etc/wall_cmos_clock 102342afc34SPhilippe Charniersee 103342afc34SPhilippe Charnier.Xr adjkerntz 8 . 104239e57d0SGarrett Wollman.It Pa /usr/share/misc/iso3166 105239e57d0SGarrett Wollmanmapping of 106239e57d0SGarrett Wollman.Tn ISO 107239e57d0SGarrett Wollman3166 territory codes to names 108239e57d0SGarrett Wollman.It Pa /usr/share/zoneinfo 109239e57d0SGarrett Wollmandirectory for zoneinfo files 110239e57d0SGarrett Wollman.It Pa /usr/share/zoneinfo/zone.tab 111239e57d0SGarrett Wollmanmapping of timezone file to country and location 112ada5f18aSEdwin Groothuis.It Pa /var/db/zoneinfo 113ada5f18aSEdwin Groothuissaved name of the timezone file installed last. 1148eeb71d7SWolfram Schneider.El 1158eeb71d7SWolfram Schneider.Sh SEE ALSO 116bfd34a4aSWolfram Schneider.Xr date 1 , 1178eeb71d7SWolfram Schneider.Xr adjtime 2 , 1188eeb71d7SWolfram Schneider.Xr ctime 3 , 1198eeb71d7SWolfram Schneider.Xr timezone 3 , 1208eeb71d7SWolfram Schneider.Xr tzfile 5 , 121bfd34a4aSWolfram Schneider.Xr adjkerntz 8 , 1228eeb71d7SWolfram Schneider.Xr zdump 8 , 123bb897a87SPhilippe Charnier.Xr zic 8 124239e57d0SGarrett Wollman.Sh DISCLAIMER 125239e57d0SGarrett WollmanThe representation of certain localities as being associated with certain 126239e57d0SGarrett Wollmancountries and/or territories is for the purposes of identification only, 127239e57d0SGarrett Wollmanand does not imply any endorsement or rejection on the part of the 128b5c508fbSRuslan Ermilov.Fx 129239e57d0SGarrett WollmanProject of the territorial claims of any entity. 13059a3c79dSRuslan Ermilov.Sh BUGS 13159a3c79dSRuslan ErmilovPrograms which are already running when 13259a3c79dSRuslan Ermilov.Nm 13359a3c79dSRuslan Ermilovcreates or updates 13459a3c79dSRuslan Ermilov.Pa /etc/localtime 13559a3c79dSRuslan Ermilovwill not reflect the updated timezone. 13659a3c79dSRuslan ErmilovWhen the system is first configured for a 13759a3c79dSRuslan Ermilov.Pf non- Tn UTC 13859a3c79dSRuslan Ermilovhardware clock, it is necessary to run 13959a3c79dSRuslan Ermilov.Xr adjkerntz 8 14059a3c79dSRuslan Ermilov(which normally happens as a part of system startup) in order to update 14159a3c79dSRuslan Ermilovthe kernel's idea of the correct timezone offset. 142