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.\" 2570e3e1bdSEd Maste.Dd June 14, 2024 268eeb71d7SWolfram Schneider.Dt TZSETUP 8 27a4c37c81SRuslan Ermilov.Os 288eeb71d7SWolfram Schneider.Sh NAME 298eeb71d7SWolfram Schneider.Nm tzsetup 308eeb71d7SWolfram Schneider.Nd set local timezone 31342afc34SPhilippe Charnier.Sh SYNOPSIS 32e97407b4SRuslan Ermilov.Nm 33ada5f18aSEdwin Groothuis.Op Fl nrs 3481046d3cSRuslan Ermilov.Op Fl C Ar chroot_directory 3581046d3cSRuslan Ermilov.Op Ar zoneinfo_file | zoneinfo_name 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 474fee5114SYuri Pankovthe hardware clock does not keep UTC. 48342afc34SPhilippe Charnier.Pp 49c8b4c0aaSEd MasteThe following options are available: 50239e57d0SGarrett Wollman.Bl -tag -offset indent -width Fl 5181046d3cSRuslan Ermilov.It Fl C Ar chroot_directory 52b5f58d77SEdwin GroothuisOpen all files and directories relative to 5381046d3cSRuslan Ermilov.Ar chroot_directory . 54342afc34SPhilippe Charnier.It Fl n 555e16809cSEd MasteDo not create or symlink files. 56ada5f18aSEdwin Groothuis.It Fl r 5781046d3cSRuslan ErmilovReinstall the zoneinfo file installed last time. 5881046d3cSRuslan ErmilovThe name is obtained from 59ada5f18aSEdwin Groothuis.Pa /var/db/zoneinfo . 605d279e65SAttilio Rao.It Fl s 614fee5114SYuri PankovSkip the initial question about adjusting the clock if not set to UTC. 6270e3e1bdSEd Maste.Nm 6370e3e1bdSEd Mastewill neither create nor delete 6470e3e1bdSEd Maste.Pa /etc/wall_cmos_clock . 65*aa6fb1d2SEd MasteOn a newly installed system, the hardware clock will keep UTC. 66342afc34SPhilippe Charnier.El 67239e57d0SGarrett Wollman.Pp 68b8926904SEdwin GroothuisIt is possible to short-circuit the menu system by specifying the 69b8926904SEdwin Groothuislocation of a 7081046d3cSRuslan Ermilov.Ar zoneinfo_file 71b5f58d77SEdwin Groothuisor the name of the 7281046d3cSRuslan Ermilov.Ar zoneinfo_name 73b8926904SEdwin Groothuison the command line; this is intended mainly for pre-configured installation 74b5f58d77SEdwin Groothuisscripts or people who know which zoneinfo they want to install. 75239e57d0SGarrett Wollman.Sh TIMEZONE DATABASE 76239e57d0SGarrett WollmanThe contents of the timezone database are indexed by 774fee5114SYuri Pankov.Pa /usr/share/zoneinfo/zone1970.tab . 784fee5114SYuri PankovThis file lists, for each timezone data file, the ISO 3166 territory code, 794fee5114SYuri Pankovapproximate geographical coordinates (in ISO 6709 format), 80239e57d0SGarrett Wollmanand location within the territory. 81239e57d0SGarrett Wollman.Pp 82239e57d0SGarrett WollmanThe maintainers of the database maintain the following policies: 83239e57d0SGarrett Wollman.Bl -enum -offset indent 84239e57d0SGarrett Wollman.It 85239e57d0SGarrett WollmanAt least one zone for every country or inhabited geographical territory. 86239e57d0SGarrett Wollman.It 87239e57d0SGarrett WollmanOne zone for every distinct, documented timezone history since the 88239e57d0SGarrett Wollmanbeginning of the 89239e57d0SGarrett Wollman.Ux 904fee5114SYuri Pankovepoch (January 1, 1970, GMT). 91239e57d0SGarrett Wollman.It 9207bfccd7SRuslan ErmilovEach zone is named for the most populous city therein. 9307bfccd7SRuslan Ermilov(Where possible, 94239e57d0SGarrett Wollmanthe database includes pre-1970 history for its city.) 95239e57d0SGarrett Wollman.El 964fee5114SYuri Pankov.Pp 97239e57d0SGarrett WollmanThe source code to the database 984fee5114SYuri Pankov.Pq Pa /usr/src/contrib/tzdata/[a-z]* 99239e57d0SGarrett Wollmancontains many additional comments and documentation references for the 100239e57d0SGarrett Wollmanhistorically minded. 1018eeb71d7SWolfram Schneider.Sh FILES 1024fee5114SYuri Pankov.Bl -tag -width ".Pa /usr/share/zoneinfo/zone1970.tab" -compact 1038eeb71d7SWolfram Schneider.It Pa /etc/localtime 10481046d3cSRuslan Ermilovcurrent time zone file 1058eeb71d7SWolfram Schneider.It Pa /etc/wall_cmos_clock 106342afc34SPhilippe Charniersee 10781046d3cSRuslan Ermilov.Xr adjkerntz 8 108239e57d0SGarrett Wollman.It Pa /usr/share/misc/iso3166 1094fee5114SYuri Pankovmapping of ISO 3166 territory codes to names 110239e57d0SGarrett Wollman.It Pa /usr/share/zoneinfo 11181046d3cSRuslan Ermilovdirectory for zoneinfo files 1124fee5114SYuri Pankov.It Pa /usr/share/zoneinfo/zone1970.tab 11381046d3cSRuslan Ermilovmapping of timezone file to country and location 114ada5f18aSEdwin Groothuis.It Pa /var/db/zoneinfo 11581046d3cSRuslan Ermilovsaved name of the timezone file installed last 1168eeb71d7SWolfram Schneider.El 117b5f58d77SEdwin Groothuis.Sh EXAMPLES 118b5f58d77SEdwin GroothuisNormal usage, to select the right zoneinfo file via the dialog-based 119b5f58d77SEdwin Groothuisuser interface: 1204fee5114SYuri Pankov.Pp 1214fee5114SYuri Pankov.Dl # tzsetup 12281046d3cSRuslan Ermilov.Pp 123b5f58d77SEdwin GroothuisInstall the file 124b5f58d77SEdwin Groothuis.Pa /usr/share/zoneinfo/Australia/Sydney : 12581046d3cSRuslan Ermilov.Pp 1264fee5114SYuri Pankov.Dl "# tzsetup /usr/share/zoneinfo/Australia/Sydney" 1274fee5114SYuri Pankov.Pp 1284fee5114SYuri PankovInstall the zoneinfo file for Australia/Sydney, assumed to be located in 129b5f58d77SEdwin Groothuis.Pa /usr/share/zoneinfo : 1304fee5114SYuri Pankov.Pp 1314fee5114SYuri Pankov.Dl "# tzsetup Australia/Sydney" 13281046d3cSRuslan Ermilov.Pp 133b5f58d77SEdwin GroothuisAfter a reinstall of the zoneinfo files, you can reinstall the 13481046d3cSRuslan Ermilovlatest installed zoneinfo file (as specified in 13581046d3cSRuslan Ermilov.Pa /var/db/zoneinfo ) : 1364fee5114SYuri Pankov.Pp 1374fee5114SYuri Pankov.Dl "# tzsetup -r" 1388eeb71d7SWolfram Schneider.Sh SEE ALSO 139bfd34a4aSWolfram Schneider.Xr date 1 , 1408eeb71d7SWolfram Schneider.Xr adjtime 2 , 1418eeb71d7SWolfram Schneider.Xr ctime 3 , 1428eeb71d7SWolfram Schneider.Xr timezone 3 , 1438eeb71d7SWolfram Schneider.Xr tzfile 5 , 144bfd34a4aSWolfram Schneider.Xr adjkerntz 8 , 1458eeb71d7SWolfram Schneider.Xr zdump 8 , 146bb897a87SPhilippe Charnier.Xr zic 8 147239e57d0SGarrett Wollman.Sh DISCLAIMER 148239e57d0SGarrett WollmanThe representation of certain localities as being associated with certain 149239e57d0SGarrett Wollmancountries and/or territories is for the purposes of identification only, 150239e57d0SGarrett Wollmanand does not imply any endorsement or rejection on the part of the 151b5c508fbSRuslan Ermilov.Fx 152239e57d0SGarrett WollmanProject of the territorial claims of any entity. 15359a3c79dSRuslan Ermilov.Sh BUGS 15459a3c79dSRuslan ErmilovPrograms which are already running when 15559a3c79dSRuslan Ermilov.Nm 15659a3c79dSRuslan Ermilovcreates or updates 15759a3c79dSRuslan Ermilov.Pa /etc/localtime 15859a3c79dSRuslan Ermilovwill not reflect the updated timezone. 1594fee5114SYuri PankovWhen the system is first configured for a non-UTC 16059a3c79dSRuslan Ermilovhardware clock, it is necessary to run 16159a3c79dSRuslan Ermilov.Xr adjkerntz 8 16259a3c79dSRuslan Ermilov(which normally happens as a part of system startup) in order to update 16359a3c79dSRuslan Ermilovthe kernel's idea of the correct timezone offset. 164