Files
amiga-tz/newctime.3
T

89 lines
1.7 KiB
Plaintext
Raw Normal View History

1986-02-15 15:51:49 -05:00
.TH SETTZ 3
.SH NAME
1986-03-05 21:00:41 -05:00
settz, newctime, newlocaltime \- convert date and time to ASCII
1986-02-15 15:51:49 -05:00
.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;
1986-08-28 09:20:51 -04:00
.PP
.B struct tm * zonetime(timep, zone)
.B long *clock;
.B char *zone;
1986-02-15 15:51:49 -05:00
.SH DESCRIPTION
.I Settz
1986-03-06 09:33:04 -05:00
sets time conversion information used by
1986-02-15 15:51:49 -05:00
.IR newlocaltime .
If
.I zonename
begins with a slash,
it is used as the absolute pathname of the
.IR tzfile (5)-format
1986-03-06 09:33:04 -05:00
file from which to read the time conversion information;
1986-02-15 15:51:49 -05:00
if
.I zonename
begins with some other character,
1986-03-06 09:33:04 -05:00
it is used as a pathname relative to the standard time conversion information
1986-02-15 15:51:49 -05:00
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
1986-03-02 22:03:30 -05:00
returns
1986-03-05 18:47:27 -05:00
.IR "asctime(newlocaltime(*clock))" .
1986-08-28 09:20:51 -04:00
.PP
.I Zonetime
converts the argument time using the argument zone.
1986-02-15 15:51:49 -05:00
.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
1986-09-08 16:17:03 -04:00
/etc/timezones standard time conversion information directory
1986-02-15 15:51:49 -05:00
.SH "SEE ALSO"
1986-02-15 15:52:46 -05:00
ctime(3), getenv(3), tzfile(5)
1986-02-15 15:51:49 -05:00
.. %W%