mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-11-22 21:29:33 +00:00
89 lines
1.7 KiB
Groff
89 lines
1.7 KiB
Groff
.TH SETTZ 3
|
|
.SH NAME
|
|
settz, newctime, newlocaltime \- convert date and time to ASCII
|
|
.SH SYNOPSIS
|
|
.nf
|
|
.B settz(zonename)
|
|
.B char *zonename;
|
|
.PP
|
|
.B char *newctime(clock)
|
|
.B long *clock;
|
|
.PP
|
|
.B
|
|
#include "time.h"
|
|
.PP
|
|
.B struct tm *newlocaltime(clock)
|
|
.B long *clock;
|
|
.PP
|
|
.B char *tz_abbr;
|
|
.PP
|
|
.B struct tm * zonetime(timep, zone)
|
|
.B long *clock;
|
|
.B char *zone;
|
|
.SH DESCRIPTION
|
|
.I Settz
|
|
sets time conversion information used by
|
|
.IR newlocaltime .
|
|
If
|
|
.I zonename
|
|
begins with a slash,
|
|
it is used as the absolute pathname of the
|
|
.IR tzfile (5)-format
|
|
file from which to read the time conversion information;
|
|
if
|
|
.I zonename
|
|
begins with some other character,
|
|
it is used as a pathname relative to the standard time conversion information
|
|
directory. A call of the form
|
|
.ti +.5i
|
|
.B
|
|
settz("")
|
|
.br
|
|
causes built-in information about GMT to be used; a call of the form
|
|
.ti +.5i
|
|
.B
|
|
settz((char *) 0)
|
|
.br
|
|
is treated as if it were a call of the form
|
|
.ti +.5i
|
|
.B
|
|
settz("localtime")
|
|
.PP
|
|
.I Newlocaltime
|
|
has the same argument and return value as
|
|
.IR localtime .
|
|
If
|
|
.I newlocaltime
|
|
is called before
|
|
.I settz
|
|
is called,
|
|
.I newlocaltime
|
|
calls
|
|
.I settz
|
|
with the value returned by
|
|
.B
|
|
getenv("TZ").
|
|
.I Newlocaltime
|
|
sets
|
|
tz_abbr
|
|
to a pointer to an
|
|
ASCII string that's the time zone abbreviation to be used with
|
|
.IR newlocaltime 's
|
|
return value.
|
|
.PP
|
|
.I Newctime
|
|
returns
|
|
.IR "asctime(newlocaltime(*clock))" .
|
|
.PP
|
|
.I Zonetime
|
|
converts the argument time using the argument zone.
|
|
.SH DIAGNOSTICS
|
|
.I Settz
|
|
returns zero if all seems well; it returns negative one otherwise
|
|
(and sets things up so that its built-in information about GMT is used).
|
|
.SH FILES
|
|
/etc/timezones standard time conversion information directory
|
|
.SH "SEE ALSO"
|
|
ctime(3), getenv(3), tzfile(5)
|
|
.. %W%
|