File: tzsetup.8

package info (click to toggle)
base-config 2.53.10.3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,072 kB
  • ctags: 36
  • sloc: sh: 1,755; makefile: 101; perl: 48
file content (89 lines) | stat: -rw-r--r-- 3,348 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
.\" Copyright 1998 Marcus Brinkmann (brinkmd@debian.org) (GPL)
.TH TZSETUP 8 "16 January 2004" "Debian" "Debian Timezone Configuration"
.SH NAME
tzsetup \- set the local timezone
.SH SYNOPSIS
.B tzsetup [-y] [-g] [-c CC] [-N]
.SH DESCRIPTION
This manual page explains how you can use the
.B "tzsetup"
utility to set the local timezone. This is necessary to let your system
know about the difference between system time and local time (the time in
the real world). It is also necessary to make your system behave nicely
when your location uses Daylight Savings Time.

A valid system time together with the correct local time zone will give you
best performance and highest reliability. It is especially important in a
network environment, where even small time differences can make a mirror
refetch a whole ftp site, or where time stamps on external file systems are
used.

.B tzsetup
is typically called without any parameters from the shell. Optionally, the -y
parameter can be used, to make it always change your time zone without
asking first. The -g parameter can also be used, to make it ask if the
hardware clock is set to gmt or not. The -c parameter, followed by a
country code, hints at the country the user's time zone may be in. The -N
parameter allows it to run noninteractively if the debconf questions have
been preseeded.

After you made your choice,
.B tzsetup
will try to change the timezone for you. See the
.B INTERNALS
section below for technical details. You must have root privileges to
actually change anything. Please use
.BR tzselect (1)
as a user space command to just look at the timezones. It will print the
local time in any timezone recognized by the system.
.SH "A WORD OF WARNING"
What timezone is correct for your system? It depends on the geographical
location of the machine. Getting the correct location is important, but
the system must also know how your hardware clock is set. Most DOS based
PCs set their hardware clock on Local Time, while most UNIX systems set
their hardware clock to UTC.

The Debian GNU/Linux system gains its knowledge of this setting
from the file 
.IR /etc/default/rcS .
This file contains either the line 
.BR UTC=yes , 
which indicates that the hardware clock is set to UTC, or it contains the line
.BR UTC=no ,
which declares the hardware clock is set to Local Time. If these setting are
correct, and the hardware clock is truly set as indicated, then configuring
the proper timezone for the machine will cause the proper date and time to be
displayed. If these are not set correctly, the the reported time will be
quite incorrect. See
.BR hwclock (8)
for more details on this topic.

.SH INTERNALS
The work done by
.B tzsetup
is actually pretty simple. It just updates the link
.I /etc/localtime
to point to the correct timezone installed in
.IR /usr/share/zoneinfo/ .

There is nothing wrong with doing this manually. However, using
.B tzsetup
you don't have to remember the path to the timezones.
.SH FILES
.I /etc/timezone
.BR
.I /etc/localtime
.BR
.I /usr/share/zoneinfo
.SH "DERIVATION"
This program is based on 
.BR tzconfig (8)
-- the only major difference is that this program uses debconf for its user
interface, and that it allows configuration of GMT.
.SH "SEE ALSO"
.BR hwclock (8)
.BR tzselect (1)
.BR rcS (5)
.BR tzconfig (8)
.SH AUTHOR
Joey Hess <joeyh@debian.org>