ctime, localtime, gmtime, asctime, timezone \- convert date and time to ASCII
.B struct tm *localtime(clock)
.B struct tm *gmtime(clock)
.B char *timezone(zone, dst)
converts a time pointed to by
and returns a pointer to a
All the fields have constant width.
Sun Sep 16 01:03:52 1973\\n\\0
return pointers to structures containing
corrects for the time zone and possible daylight savings time;
converts directly to GMT, which is the time UNIX uses.
converts a broken-down time to ASCII and returns a pointer
to a 26-character string.
The structure declaration from the include file is:
These quantities give the time on a 24-hour clock,
day of month (1-31), month of year (0-11), day of week
(Sunday = 0), year \- 1900, day of year (0-365),
and a flag that is nonzero if daylight saving time is in effect.
When local time is called for,
the program consults the system to determine the time zone and
whether the standard U.S.A. daylight saving time adjustment is
The program knows about the peculiarities
of this conversion in 1974 and 1975;
a table for these years can be extended.
returns the name of the time zone associated with its first argument,
which is measured in minutes westward from Greenwich.
If the second argument is 0, the standard name is used,
otherwise the Daylight Saving version.
If the required name does not appear in a table
the difference from GMT is produced; e.g.
.I timezone(\-(60*4+30), 0)
is appropriate because it is 4:30 ahead of GMT
The return values point to static data
whose content is overwritten by each call.