ctime64.3c (2010 09)
c
ctime64(3C) ctime64(3C)
ctime64(), gmtime64(), localtime64()
, mktime64(), ctime64_r(), gmtime64_r(), and
localtime64_r()
returns NULL and sets errno to [ERANGE] if timer is less than the number of
seconds that corresponds to the minimum date supported (in other words,
INT_MIN, as defined in
limits.h), or exceeds the number of seconds that corresponds to the maximum date supported.
For more details on
struct tm
(see ctime (3C)).
EXTERNAL INFLUENCES
Locale
The
LC_CTYPE category determines the interpretation of the bytes within format as single and/or multi-
byte characters.
Environment Variables
The
tzset() function uses the contents of
TZ to set the values of the external variables timezone,
daylight, and tzname. TZ also determines the time zone name substituted for the
%Z and %z direc-
tives and the time zone adjustments performed by
localtime64(), mktime64(), and
ctime64().
Two methods for specifying a time zone within
TZ are described in environ (5).
International Code Set Support
Single and multibyte character code sets are supported.
RETURN VALUE
For
ctime64_r(), if the buffer is of insufficient length, a NULL is returned and errno set to [EINVAL].
ctime64_r(), gmtime64_r(), and localtime64_r()
return a NULL and set errno to [EINVAL]
if NULL pointers are passed in as arguments.
A NULL is returned and errno is set to [ERANGE] if the input to the following routines is not within the
supported range:
ctime64(), ctime64_r(), gmtime64(), gmtime64_r(), localtime64()
,
and
localtime64_r()
.
APPLICATION USAGE
The return values for
ctime64(), gmtime64(), and localtime64()
point to static data whose con-
tents is overwritten by each call.
WARNINGS
The range of
tm_sec([0,61])
extends to 61 to allow for the occasional one or two leap seconds. How-
ever, the "seconds since the Epoch" value returned by
time() (see time (2)) and passed as the timer argu-
ment does not include accumulated leap seconds. The
tm structure generated by localtime64()
and
gmtime64() will never reflect any leap seconds. Upon successful completion, mktime64() forces the
value of the tm_sec component to the range [0,59].
AUTHOR
ctime64() was developed by HP.
SEE ALSO
time(2), ctime(3C), setlocale(3C), tztab(4), environ(5), lang(5), langinfo(5), thread_safety(5).
2 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: September 2010