4 #include <celib_defs.h>
11 extern long _timezone;
14 extern char *_tzname[];
15 extern const char __dnames[];
16 extern const char __mnames[];
20 #define _DAY_SEC (24L * 60L * 60L) /* secs in a day */
21 #define _YEAR_SEC (365L * _DAY_SEC) /* secs in a year */
22 #define _FOUR_YEAR_SEC (1461L * _DAY_SEC) /* secs in a 4 year interval */
23 #define _DEC_SEC 315532800L /* secs in 1970-1979 */
24 #define _BASE_YEAR 70L /* 1970 is the base year */
25 #define _BASE_DOW 4 /* 01-01-70 was a Thursday */
26 #define _LEAP_YEAR_ADJUST 17L /* Leap years 1900 - 1970 */
27 #define _MAX_YEAR 138L /* 2038 is the max year */
30 int tm_sec; /* seconds after the minute - [0,59] */
31 int tm_min; /* minutes after the hour - [0,59] */
32 int tm_hour; /* hours since midnight - [0,23] */
33 int tm_mday; /* day of the month - [1,31] */
34 int tm_mon; /* months since January - [0,11] */
35 int tm_year; /* years since 1900 */
36 int tm_wday; /* days since Sunday - [0,6] */
37 int tm_yday; /* days since January 1 - [0,365] */
38 int tm_isdst; /* daylight savings time flag */
41 XCE_EXPORT struct tm * xcegmtime(const time_t *timp);
42 XCE_EXPORT struct tm *xcelocaltime (const time_t *ptime);
43 XCE_EXPORT char *xceasctime (const struct tm *tb);
44 XCE_EXPORT int xceutime (const char *fname, struct _utimbuf *times);
45 XCE_EXPORT int xcefutime (int fh, struct _utimbuf *times);
46 XCE_EXPORT void xceftime (struct _timeb *tp);
47 XCE_EXPORT void xcegettimeofday (struct timeval *tv, struct timezone *tz);
48 XCE_EXPORT char *xcectime(const time_t *timp);
49 XCE_EXPORT void xceftime (struct _timeb *tp);
50 XCE_EXPORT time_t xcemktime (struct tm *tb);
51 XCE_EXPORT time_t xcetime (time_t *timeptr);
52 XCE_EXPORT void _xcetzset(void);