126 lines
4.4 KiB
HTML
126 lines
4.4 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>TZ(5)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>TZ(5)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
TZ - Time zone environment variable
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>TZ=</STRONG><EM>zone</EM>[<STRONG>-</STRONG>]<EM>offset</EM>[<EM>dst</EM>[<EM>offset</EM>][<STRONG>,</STRONG><EM>start</EM>[<STRONG>/</STRONG><EM>time</EM>]<STRONG>,</STRONG><EM>end</EM>[<STRONG>/</STRONG><EM>time</EM>]]]
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
The <STRONG>TZ</STRONG> environment variable tells functions such as the <STRONG><A HREF="../man3/ctime.3.html">ctime(3)</A></STRONG> family
|
|
and programs like <STRONG>date</STRONG> what the time zone and daylight saving rule is.
|
|
The value of <STRONG>TZ</STRONG> has the POSIX standardized form shown in the synopsis.
|
|
This form specifies the zone names, offsets from GMT, and daylight
|
|
savings changeover times for at least the current year.
|
|
|
|
<EM>zone</EM> A three or more letter name for the time zone in normal (winter)
|
|
time.
|
|
|
|
<STRONG>[-]</STRONG><EM>offset</EM>
|
|
A signed time telling the offset of the time zone westwards from
|
|
Greenwich. The time has the form <EM>hh</EM>[:<EM>mm</EM>[:<EM>ss</EM>]] with a one of two
|
|
digit hour, and optional two digit minutes and seconds.
|
|
|
|
<EM>dst</EM> The name of the time zone when daylight savings is in effect. It
|
|
may be followed by an offset telling how big the clock correction is
|
|
other than the default of 1 hour.
|
|
|
|
<EM>start</EM>/<EM>time</EM>,<EM>end</EM>/<EM>time</EM>
|
|
Specifies the start and end of the daylight savings period. The
|
|
<EM>start</EM> and <EM>end</EM> fields indicate on what day the changeover occurs.
|
|
They must be in one of the following formats:
|
|
|
|
<STRONG>J</STRONG><EM>n</EM> The Julian day <EM>n</EM> (1 <= <EM>n</EM> <= 365) ignoring leap days, i.e. there
|
|
is no February 29.
|
|
|
|
<EM>n</EM> The zero-based Julian day (0 <= <EM>n</EM> <= 365). Leap days are not
|
|
ignored.
|
|
|
|
<STRONG>M</STRONG><EM>m</EM><STRONG>.</STRONG><EM>n</EM><STRONG>.</STRONG><EM>d</EM>
|
|
This indicates month <EM>m</EM>, the <EM>n</EM>-th occurrence of day <EM>d</EM> (1 <= <EM>m</EM> <=
|
|
12, 1 <= <EM>n</EM> <= 5, 0 <= <EM>d</EM> <= 6, 0=Sunday). The 5-th occurrence
|
|
means the last occurrence of that day in a month. So <STRONG>M4.1.0</STRONG> is
|
|
the first Sunday in April, <STRONG>M9.5.0</STRONG> is the last Sunday in
|
|
September.
|
|
|
|
The <EM>time</EM> field indicates the time the changeover occurs on the given
|
|
day.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
<H2>EXAMPLES</H2><PRE>
|
|
Greenwich Mean Time:
|
|
|
|
<STRONG>TZ=GMT0</STRONG>
|
|
|
|
Middle European Time, 1 hour east from Greenwich, daylight savings starts
|
|
on the last Sunday in March at 2 AM and ends on the last Sunday in
|
|
October at 3 AM:
|
|
|
|
<STRONG>TZ='MET-1MET</STRONG> <STRONG>DST,M3.5.0/2,M10.5.0/3'</STRONG>
|
|
|
|
British time, daylight savings starts and ends at the same moment as MET,
|
|
but in an earlier time zone:
|
|
|
|
<STRONG>TZ=GMT0BST,M3.5.0/1,M10.5.0/2</STRONG>
|
|
|
|
The eastern european time zones also have the changeovers at the same
|
|
absolute time as British time and MET.
|
|
|
|
U.S. Eastern Standard Time, 5 hours west from Greenwich, daylight savings
|
|
starts on the first Sunday in April at 2 AM and ends on the last Sunday
|
|
in October at 2 AM:
|
|
|
|
<STRONG>TZ=EST5EDT,M4.1.0/2,M10.5.0/2</STRONG>
|
|
|
|
It shouldn't surprise you that daylight savings in New Zealand is
|
|
observed in the months opposite from the previous examples. It starts on
|
|
the first Sunday in October at 2 AM and ends on the third Sunday in March
|
|
at 3 AM:
|
|
|
|
<STRONG>TZ=NZST-12NZDT,M10.1.0/2,M3.3.0/3</STRONG>
|
|
|
|
|
|
</PRE>
|
|
<H2>SEE ALSO</H2><PRE>
|
|
<STRONG><A HREF="../man8/readclock.8.html">readclock(8)</A></STRONG>, <STRONG><A HREF="../man1/date.1.html">date(1)</A></STRONG>.
|
|
|
|
|
|
</PRE>
|
|
<H2>BUGS</H2><PRE>
|
|
You may have noticed that many fields are optional. Do no omit them,
|
|
because the defaults are bogus. If you need daylight savings then fully
|
|
specify the changeovers.
|
|
|
|
West is negative, east is positive, ask any sailor.
|
|
|
|
|
|
</PRE>
|
|
<H2>AUTHOR</H2><PRE>
|
|
Kees J. Bot (kjb@cs.vu.nl)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|