| 1 |
<?xml version='1.0'?> <!--*-nxml-*--> |
| 2 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
| 3 |
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> |
| 4 |
<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
| 5 |
|
| 6 |
<refentry id="localtime"> |
| 7 |
<refentryinfo> |
| 8 |
<title>localtime</title> |
| 9 |
<productname>systemd</productname> |
| 10 |
</refentryinfo> |
| 11 |
|
| 12 |
<refmeta> |
| 13 |
<refentrytitle>localtime</refentrytitle> |
| 14 |
<manvolnum>5</manvolnum> |
| 15 |
</refmeta> |
| 16 |
|
| 17 |
<refnamediv> |
| 18 |
<refname>localtime</refname> |
| 19 |
<refpurpose>Local timezone configuration file</refpurpose> |
| 20 |
</refnamediv> |
| 21 |
|
| 22 |
<refsynopsisdiv> |
| 23 |
<para><filename>/etc/localtime</filename> -> <filename>../usr/share/zoneinfo/…</filename></para> |
| 24 |
</refsynopsisdiv> |
| 25 |
|
| 26 |
<refsect1> |
| 27 |
<title>Description</title> |
| 28 |
|
| 29 |
<para>The <filename>/etc/localtime</filename> file configures the |
| 30 |
system-wide timezone of the local system that is used by |
| 31 |
applications for presentation to the user. It should be an |
| 32 |
absolute or relative symbolic link pointing to |
| 33 |
<filename>/usr/share/zoneinfo/</filename>, followed by a timezone |
| 34 |
identifier such as <literal>Europe/Berlin</literal> or |
| 35 |
<literal>Etc/UTC</literal>. The resulting link should lead to the |
| 36 |
corresponding binary |
| 37 |
<citerefentry project='man-pages'><refentrytitle>tzfile</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 38 |
timezone data for the configured timezone.</para> |
| 39 |
|
| 40 |
<para>Because the timezone identifier is extracted from the |
| 41 |
symlink target name of <filename>/etc/localtime</filename>, this |
| 42 |
file may not be a normal file or hardlink.</para> |
| 43 |
|
| 44 |
<para>If <filename>/etc/localtime</filename> is missing, the |
| 45 |
default <literal>UTC</literal> timezone is used.</para> |
| 46 |
|
| 47 |
<para>The timezone may be overridden for individual programs by |
| 48 |
using the <varname>$TZ</varname> environment variable. See |
| 49 |
<citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> |
| 50 |
|
| 51 |
<para>You may use |
| 52 |
<citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
| 53 |
to change the settings of this file from the command line during |
| 54 |
runtime. Use |
| 55 |
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
| 56 |
to initialize the time zone on mounted (but not booted) system |
| 57 |
images.</para> |
| 58 |
</refsect1> |
| 59 |
|
| 60 |
<refsect1> |
| 61 |
<title>See Also</title> |
| 62 |
<para><simplelist type="inline"> |
| 63 |
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 64 |
<member><citerefentry project='man-pages'><refentrytitle>tzset</refentrytitle><manvolnum>3</manvolnum></citerefentry></member> |
| 65 |
<member><citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>3</manvolnum></citerefentry></member> |
| 66 |
<member><citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 67 |
<member><citerefentry><refentrytitle>systemd-timedated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> |
| 68 |
<member><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 69 |
</simplelist></para> |
| 70 |
</refsect1> |
| 71 |
|
| 72 |
</refentry> |