SETTZ
Section: C Library Functions (3)
Index
Return to Main Contents
NAME
settz, newctime, newlocaltime - convert date and time to ASCII
SYNOPSIS
settz(zonename)
char *zonename;
char *newctime(clock)
long *clock;
#include "time.h"
struct tm *newlocaltime(clock)
long *clock;
char *tz_abbr;
DESCRIPTION
Settz
sets time conversion information used by
newlocaltime.
If
zonename
begins with a slash,
it is used as the absolute pathname of the
tzfile(5)-format
file from which to read the time conversion information;
if
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
settz("")
causes built-in information about GMT to be used; a call of the form
settz((char *) 0)
is treated as if it were a call of the form
settz("localtime")
Newlocaltime
has the same argument and return value as
localtime.
If
newlocaltime
is called before
settz
is called,
newlocaltime
calls
settz
with the value returned by
getenv("TZ").
Newlocaltime
sets
tz_abbr
to a pointer to an
ASCII string that's the time zone abbreviation to be used with
newlocaltime's
return value.
Newctime
returns
asctime(newlocaltime(*clock)).
DIAGNOSTICS
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).
FILES
/etc/tzdir standard time conversion information directory
SEE ALSO
ctime(3), getenv(3), tzfile(5)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- DIAGNOSTICS
-
- FILES
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 06:39:27 GMT, December 12, 2024