Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/tzsetup/tzsetup.8
Show All 18 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd October 21, 2009 | .Dd April 18, 2023 | ||||
.Dt TZSETUP 8 | .Dt TZSETUP 8 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm tzsetup | .Nm tzsetup | ||||
.Nd set local timezone | .Nd set local timezone | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl nrs | .Op Fl nrs | ||||
.Op Fl C Ar chroot_directory | .Op Fl C Ar chroot_directory | ||||
.Op Ar zoneinfo_file | zoneinfo_name | .Op Ar zoneinfo_file | zoneinfo_name | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
utility reads a database of timezone information and presents a menu | utility reads a database of timezone information and presents a menu | ||||
allowing the user to select a specific zone without knowing the details | allowing the user to select a specific zone without knowing the details | ||||
of the database layout. | of the database layout. | ||||
The selected zone is installed as the system | The selected zone is installed as the system | ||||
default zone. | default zone. | ||||
The | The | ||||
.Nm | .Nm | ||||
utility also determines whether any adjustment is necessary for systems where | utility also determines whether any adjustment is necessary for systems where | ||||
the hardware clock does not keep | the hardware clock does not keep UTC. | ||||
.Tn UTC . | |||||
.Pp | .Pp | ||||
The following options are available: | The following options are available: | ||||
.Bl -tag -offset indent -width Fl | .Bl -tag -offset indent -width Fl | ||||
.It Fl C Ar chroot_directory | .It Fl C Ar chroot_directory | ||||
Open all files and directories relative to | Open all files and directories relative to | ||||
.Ar chroot_directory . | .Ar chroot_directory . | ||||
.It Fl n | .It Fl n | ||||
Do not create or copy files. | Do not create or copy files. | ||||
.It Fl r | .It Fl r | ||||
Reinstall the zoneinfo file installed last time. | Reinstall the zoneinfo file installed last time. | ||||
The name is obtained from | The name is obtained from | ||||
.Pa /var/db/zoneinfo . | .Pa /var/db/zoneinfo . | ||||
.It Fl s | .It Fl s | ||||
Skip the initial question about adjusting the clock if not set to | Skip the initial question about adjusting the clock if not set to UTC. | ||||
.Tn UTC . | |||||
.El | .El | ||||
.Pp | .Pp | ||||
It is possible to short-circuit the menu system by specifying the | It is possible to short-circuit the menu system by specifying the | ||||
location of a | location of a | ||||
.Ar zoneinfo_file | .Ar zoneinfo_file | ||||
or the name of the | or the name of the | ||||
.Ar zoneinfo_name | .Ar zoneinfo_name | ||||
on the command line; this is intended mainly for pre-configured installation | on the command line; this is intended mainly for pre-configured installation | ||||
scripts or people who know which zoneinfo they want to install. | scripts or people who know which zoneinfo they want to install. | ||||
.Sh TIMEZONE DATABASE | .Sh TIMEZONE DATABASE | ||||
The contents of the timezone database are indexed by | The contents of the timezone database are indexed by | ||||
.Pa /usr/share/zoneinfo/zone.tab . | .Pa /usr/share/zoneinfo/zone1970.tab . | ||||
This file lists, for each timezone data file, the | This file lists, for each timezone data file, the ISO 3166 territory code, | ||||
.Tn ISO | approximate geographical coordinates (in ISO 6709 format), | ||||
3166 territory code, approximate geographical coordinates | |||||
(in | |||||
.Tn ISO | |||||
6709 format), | |||||
and location within the territory. | and location within the territory. | ||||
.Pp | .Pp | ||||
The maintainers of the database maintain the following policies: | The maintainers of the database maintain the following policies: | ||||
.Bl -enum -offset indent | .Bl -enum -offset indent | ||||
.It | .It | ||||
At least one zone for every country or inhabited geographical territory. | At least one zone for every country or inhabited geographical territory. | ||||
.It | .It | ||||
One zone for every distinct, documented timezone history since the | One zone for every distinct, documented timezone history since the | ||||
beginning of the | beginning of the | ||||
.Ux | .Ux | ||||
epoch (January 1, 1970, | epoch (January 1, 1970, GMT). | ||||
.Tn GMT ) . | |||||
.It | .It | ||||
Each zone is named for the most populous city therein. | Each zone is named for the most populous city therein. | ||||
(Where possible, | (Where possible, | ||||
the database includes pre-1970 history for its city.) | the database includes pre-1970 history for its city.) | ||||
.El | .El | ||||
.Pp | |||||
The source code to the database | The source code to the database | ||||
.Pq Pa /usr/src/share/zoneinfo/[a-z]* | .Pq Pa /usr/src/contrib/tzdata/[a-z]* | ||||
contains many additional comments and documentation references for the | contains many additional comments and documentation references for the | ||||
historically minded. | historically minded. | ||||
.Sh FILES | .Sh FILES | ||||
.Bl -tag -width ".Pa /usr/share/zoneinfo/zone.tab" -compact | .Bl -tag -width ".Pa /usr/share/zoneinfo/zone1970.tab" -compact | ||||
.It Pa /etc/localtime | .It Pa /etc/localtime | ||||
current time zone file | current time zone file | ||||
.It Pa /etc/wall_cmos_clock | .It Pa /etc/wall_cmos_clock | ||||
see | see | ||||
.Xr adjkerntz 8 | .Xr adjkerntz 8 | ||||
.It Pa /usr/share/misc/iso3166 | .It Pa /usr/share/misc/iso3166 | ||||
mapping of | mapping of ISO 3166 territory codes to names | ||||
.Tn ISO | |||||
3166 territory codes to names | |||||
.It Pa /usr/share/zoneinfo | .It Pa /usr/share/zoneinfo | ||||
directory for zoneinfo files | directory for zoneinfo files | ||||
.It Pa /usr/share/zoneinfo/zone.tab | .It Pa /usr/share/zoneinfo/zone1970.tab | ||||
mapping of timezone file to country and location | mapping of timezone file to country and location | ||||
.It Pa /var/db/zoneinfo | .It Pa /var/db/zoneinfo | ||||
saved name of the timezone file installed last | saved name of the timezone file installed last | ||||
.El | .El | ||||
.Sh EXAMPLES | .Sh EXAMPLES | ||||
Normal usage, to select the right zoneinfo file via the dialog-based | Normal usage, to select the right zoneinfo file via the dialog-based | ||||
user interface: | user interface: | ||||
.Dl tzsetup | |||||
.Pp | .Pp | ||||
.Dl # tzsetup | |||||
.Pp | |||||
Install the file | Install the file | ||||
.Pa /usr/share/zoneinfo/Australia/Sydney : | .Pa /usr/share/zoneinfo/Australia/Sydney : | ||||
.Dl "tzsetup /usr/share/zoneinfo/Australia/Sydney" | |||||
.Pp | .Pp | ||||
Install the zoneinfo file for Australia/Sydney, assumed to be located | .Dl "# tzsetup /usr/share/zoneinfo/Australia/Sydney" | ||||
in | .Pp | ||||
Install the zoneinfo file for Australia/Sydney, assumed to be located in | |||||
.Pa /usr/share/zoneinfo : | .Pa /usr/share/zoneinfo : | ||||
.Dl "tzsetup Australia/Sydney" | |||||
.Pp | .Pp | ||||
.Dl "# tzsetup Australia/Sydney" | |||||
.Pp | |||||
After a reinstall of the zoneinfo files, you can reinstall the | After a reinstall of the zoneinfo files, you can reinstall the | ||||
latest installed zoneinfo file (as specified in | latest installed zoneinfo file (as specified in | ||||
.Pa /var/db/zoneinfo ) : | .Pa /var/db/zoneinfo ) : | ||||
.Dl "tzsetup -r" | .Pp | ||||
.Dl "# tzsetup -r" | |||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr date 1 , | .Xr date 1 , | ||||
.Xr adjtime 2 , | .Xr adjtime 2 , | ||||
.Xr ctime 3 , | .Xr ctime 3 , | ||||
.Xr timezone 3 , | .Xr timezone 3 , | ||||
.Xr tzfile 5 , | .Xr tzfile 5 , | ||||
.Xr adjkerntz 8 , | .Xr adjkerntz 8 , | ||||
.Xr zdump 8 , | .Xr zdump 8 , | ||||
.Xr zic 8 | .Xr zic 8 | ||||
.Sh DISCLAIMER | .Sh DISCLAIMER | ||||
The representation of certain localities as being associated with certain | The representation of certain localities as being associated with certain | ||||
countries and/or territories is for the purposes of identification only, | countries and/or territories is for the purposes of identification only, | ||||
and does not imply any endorsement or rejection on the part of the | and does not imply any endorsement or rejection on the part of the | ||||
.Fx | .Fx | ||||
Project of the territorial claims of any entity. | Project of the territorial claims of any entity. | ||||
.Sh BUGS | .Sh BUGS | ||||
Programs which are already running when | Programs which are already running when | ||||
.Nm | .Nm | ||||
creates or updates | creates or updates | ||||
.Pa /etc/localtime | .Pa /etc/localtime | ||||
will not reflect the updated timezone. | will not reflect the updated timezone. | ||||
When the system is first configured for a | When the system is first configured for a non-UTC | ||||
.Pf non- Tn UTC | |||||
hardware clock, it is necessary to run | hardware clock, it is necessary to run | ||||
.Xr adjkerntz 8 | .Xr adjkerntz 8 | ||||
(which normally happens as a part of system startup) in order to update | (which normally happens as a part of system startup) in order to update | ||||
the kernel's idea of the correct timezone offset. | the kernel's idea of the correct timezone offset. |