1 .\" Copyright (c) 1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 .\" $FreeBSD: src/usr.sbin/tzsetup/tzsetup.8,v 1.26 2012/11/17 01:54:59 svnexp Exp $
32 .Nd set local timezone
36 .Op Fl C Ar chroot_directory
37 .Op Ar zoneinfo_file | zoneinfo_name
41 utility reads a database of timezone information and presents a menu
42 allowing the user to select a specific zone without knowing the details
43 of the database layout.
44 The selected zone is installed as the system
48 utility also determines whether any adjustment is necessary for systems where
49 the hardware clock does not keep
52 The following options are available:
53 .Bl -tag -offset indent -width Fl
54 .It Fl C Ar chroot_directory
55 Open all files and directories relative to
56 .Ar chroot_directory .
58 Do not create or copy files.
60 Reinstall the zoneinfo file installed last time.
61 The name is obtained from
62 .Pa /var/db/zoneinfo .
64 Skip the initial question about adjusting the clock if not set to
68 It is possible to short-circuit the menu system by specifying the
73 on the command line; this is intended mainly for pre-configured installation
74 scripts or people who know which zoneinfo they want to install.
76 The contents of the timezone database are indexed by
77 .Pa /usr/share/zoneinfo/zone.tab .
78 This file lists, for each timezone data file, the
80 3166 territory code, approximate geographical coordinates
84 and location within the territory.
86 The maintainers of the database maintain the following policies:
87 .Bl -enum -offset indent
89 At least one zone for every country or inhabited geographical territory.
91 One zone for every distinct, documented timezone history since the
94 epoch (January 1, 1970,
97 Each zone is named for the most populous city therein.
99 the database includes pre-1970 history for its city.)
101 The source code to the database
102 .Pq Pa /usr/src/share/zoneinfo/[a-z]*
103 contains many additional comments and documentation references for the
106 .Bl -tag -width ".Pa /usr/share/zoneinfo/zone.tab" -compact
107 .It Pa /etc/localtime
108 current time zone file
109 .It Pa /etc/wall_cmos_clock
112 .It Pa /usr/share/misc/iso3166
115 3166 territory codes to names
116 .It Pa /usr/share/zoneinfo
117 directory for zoneinfo files
118 .It Pa /usr/share/zoneinfo/zone.tab
119 mapping of timezone file to country and location
120 .It Pa /var/db/zoneinfo
121 saved name of the timezone file installed last
124 Normal usage, to select the right zoneinfo file via the dialog-based
129 .Pa /usr/share/zoneinfo/Australia/Sydney :
130 .Dl "tzsetup /usr/share/zoneinfo/Australia/Sydney"
132 Install the zoneinfo file for Australia/Sydney, assumed to be located
134 .Pa /usr/share/zoneinfo :
135 .Dl "tzsetup Australia/Sydney"
137 After a reinstall of the zoneinfo files, you can reinstall the
138 latest installed zoneinfo file (as specified in
139 .Pa /var/db/zoneinfo ) :
150 The representation of certain localities as being associated with certain
151 countries and/or territories is for the purposes of identification only,
152 and does not imply any endorsement or rejection on the part of the
154 Project of the territorial claims of any entity.
156 Programs which are already running when
160 will not reflect the updated timezone.
161 When the system is first configured for a
163 hardware clock, it is necessary to run
165 (which normally happens as a part of system startup) in order to update
166 the kernel's idea of the correct timezone offset.