xref: /dragonfly/usr.sbin/tzsetup/tzsetup.8 (revision e89cf083)
1.\" Copyright (c) 1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
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.
12.\"
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
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD: head/usr.sbin/tzsetup/tzsetup.8 232297 2012-02-29 14:44:42Z emaste $
26.\"
27.Dd February 14, 2013
28.Dt TZSETUP 8
29.Os
30.Sh NAME
31.Nm tzsetup
32.Nd set local timezone
33.Sh SYNOPSIS
34.Nm
35.Op Fl nrs
36.Op Fl C Ar chroot_directory
37.Op Ar zoneinfo_file | zoneinfo_name
38.Sh DESCRIPTION
39The
40.Nm
41utility reads a database of timezone information and presents a menu
42allowing the user to select a specific zone without knowing the details
43of the database layout.
44The selected zone is installed as the system
45default zone.
46The
47.Nm
48utility also determines whether any adjustment is necessary for systems where
49the hardware clock does not keep
50.Tn UTC .
51.Pp
52The following options are available:
53.Bl -tag -offset indent -width Fl
54.It Fl C Ar chroot_directory
55Open all files and directories relative to
56.Ar chroot_directory .
57.It Fl n
58Do not create or copy files.
59.It Fl r
60Reinstall the zoneinfo file installed last time.
61The name is obtained from
62.Pa /var/db/zoneinfo .
63.It Fl s
64Skip the initial question about adjusting the clock if not set to
65.Tn UTC .
66.El
67.Pp
68It is possible to short-circuit the menu system by specifying the
69location of a
70.Ar zoneinfo_file
71or the name of the
72.Ar zoneinfo_name
73on the command line; this is intended mainly for pre-configured installation
74scripts or people who know which zoneinfo they want to install.
75.Sh TIMEZONE DATABASE
76The contents of the timezone database are indexed by
77.Pa /usr/share/zoneinfo/zone.tab .
78This file lists, for each timezone data file, the
79.Tn ISO
803166 territory code, approximate geographical coordinates
81(in
82.Tn ISO
836709 format),
84and location within the territory.
85.Pp
86The maintainers of the database maintain the following policies:
87.Bl -enum -offset indent
88.It
89At least one zone for every country or inhabited geographical territory.
90.It
91One zone for every distinct, documented timezone history since the
92beginning of the
93.Ux
94epoch (January 1, 1970,
95.Tn GMT ) .
96.It
97Each zone is named for the most populous city therein.
98(Where possible,
99the database includes pre-1970 history for its city.)
100.El
101The source code to the database
102.Pq Pa /usr/src/share/zoneinfo/[a-z]*
103contains many additional comments and documentation references for the
104historically minded.
105.Sh FILES
106.Bl -tag -width ".Pa /usr/share/zoneinfo/zone.tab" -compact
107.It Pa /etc/localtime
108current time zone file
109.It Pa /etc/wall_cmos_clock
110see
111.Xr adjkerntz 8
112.It Pa /usr/share/misc/iso3166
113mapping of
114.Tn ISO
1153166 territory codes to names
116.It Pa /usr/share/zoneinfo
117directory for zoneinfo files
118.It Pa /usr/share/zoneinfo/zone.tab
119mapping of timezone file to country and location
120.It Pa /var/db/zoneinfo
121saved name of the timezone file installed last
122.El
123.Sh EXAMPLES
124Normal usage, to select the right zoneinfo file via the dialog-based
125user interface:
126.Dl tzsetup
127.Pp
128Install the file
129.Pa /usr/share/zoneinfo/Australia/Sydney :
130.Dl "tzsetup /usr/share/zoneinfo/Australia/Sydney"
131.Pp
132Install the zoneinfo file for Australia/Sydney, assumed to be located
133in
134.Pa /usr/share/zoneinfo :
135.Dl "tzsetup Australia/Sydney"
136.Pp
137After a reinstall of the zoneinfo files, you can reinstall the
138latest installed zoneinfo file (as specified in
139.Pa /var/db/zoneinfo ) :
140.Dl "tzsetup -r"
141.Sh SEE ALSO
142.Xr date 1 ,
143.Xr adjtime 2 ,
144.Xr ctime 3 ,
145.Xr tzfile 5 ,
146.Xr adjkerntz 8 ,
147.Xr zdump 8 ,
148.Xr zic 8
149.Sh DISCLAIMER
150The representation of certain localities as being associated with certain
151countries and/or territories is for the purposes of identification only,
152and does not imply any endorsement or rejection on the part of the
153.Dx
154Project of the territorial claims of any entity.
155.Sh BUGS
156Programs which are already running when
157.Nm
158creates or updates
159.Pa /etc/localtime
160will not reflect the updated timezone.
161When the system is first configured for a
162.Pf non- Tn UTC
163hardware clock, it is necessary to run
164.Xr adjkerntz 8
165(which normally happens as a part of system startup) in order to update
166the kernel's idea of the correct timezone offset.
167