.TH tzset() "" "" "Time Function (libc)"
.PC "Set the local time zone"
.B
#include <time.h>
#include <sys/types.h>
void tzset(\^)
extern long timezone; char *tzname[2][16];
.R
.PP
.B tzset()
is one of the suite of \*(CO functions that control and display
the system's time.
It searches for the environmental parameter
.BR TIMEZONE ,
which gives information on the local time zone.
For more information on
.BR TIMEZONE ,
see its Lexicon entry.
.PP
If
.B TIMEZONE
is set,
.B tzset()
initializes the external variables
.B timezone
and
.BR tzname .
.B timezone
contains the number of seconds to be subtracted
from GMT to obtain local standard time.
.B "tzname[0]"
and
.B "tzname[1]"
are character arrays that
hold, respectively, the names of the local standard time zone
and the local daylight-saving time zone.
If
.B TIMEZONE
is not set,
.B timezone
defaults to zero,
.B tzname[0]
to \fBGMT\fR,
and
.B tzname[1]
to the empty string.
.SH "See Also"
.Xr "date," date
.Xr "ftime()," ftime
.Xr "libc," libc
.Xr "localization," localizat
.Xr "time [overview]," time.a
.Xr "TIMEZONE" timezone
.SH "Notes"
.II settz()
.B tzset()
used to be named
.BR settz() .
It has been renamed to conform to published standards.
