3 ctime, localtime, gmtime, asctime, tm2sec, timezone \- convert date and time
11 char* ctime(long clock)
14 Tm* localtime(long clock)
17 Tm* gmtime(long clock)
36 and returns a pointer to a
38 in the following form.
39 All the fields have constant width.
42 Wed Aug 5 01:07:47 EST 1973\en\e0
47 return pointers to structures containing
50 corrects for the time zone and possible daylight savings time;
52 converts directly to GMT.
54 converts a broken-down time to
60 .ta 6n +\w'char 'u +\w'zone[4]; 'u
63 int sec; /* seconds (range 0..59) */
64 int min; /* minutes (0..59) */
65 int hour; /* hours (0..23) */
66 int mday; /* day of the month (1..31) */
67 int mon; /* month of the year (0..11) */
68 int year; /* year A.D. \- 1900 */
69 int wday; /* day of week (0..6, Sunday = 0) */
70 int yday; /* day of year (0..365) */
71 char zone[4]; /* time zone name */
72 int tzoff; /* time zone delta from GMT */
77 converts a broken-down time to
78 seconds since the start of the epoch.
81 and assumes the local time zone
87 When local time is first requested,
88 the program consults the
90 environment variable to determine the time zone and
92 (This variable is set at system boot time by
97 the normal time zone name and its difference from GMT
98 in seconds followed by an alternate (daylight) time zone name and
99 its difference followed by a newline.
100 The remainder is a list of pairs of times
101 (seconds past the start of 1970, in the first time zone)
102 when the alternate time zone applies.
106 EST -18000 EDT -14400
107 9943200 25664400 41392800 57718800 ...
110 Greenwich Mean Time is represented by
116 .B /sys/src/libc/9sys
122 The return values point to static data
123 whose content is overwritten by each call.
125 Daylight Savings Time is ``normal'' in the Southern hemisphere.
127 These routines are not equipped to handle non-\c
129 text, and are provincial anyway.