|
|
1.1 ! root 1: /* date.h - net2xt, xt2net, isleap, ut2ltim */ ! 2: ! 3: /* Xinu stores time as seconds past Jan 1, 1970 (UNIX format), with */ ! 4: /* 1 being 1 second into Jan. 1, 1970, GMT (universal time). The */ ! 5: /* Internet uses seconds past Jan 1, 1900 (also GMT or universal time) */ ! 6: ! 7: #define net2xt(x) ((x)-2208988800L) /* convert net-to-xinu time */ ! 8: #define xt2net(x) ((x)+2208988800L) /* convert xinu-to-net time */ ! 9: ! 10: /* Days in months and month names used to format a date */ ! 11: ! 12: struct datinfo { ! 13: int dt_msize[12]; ! 14: char *dt_mnam[12]; ! 15: }; ! 16: ! 17: extern struct datinfo Dat; ! 18: ! 19: /* Constants for converting time to month/day/year/hour/minute/second */ ! 20: ! 21: #define isleap(x) ((x)%4==0) /* leap year? (1970-1999) */ ! 22: #define SECPERDY (60L*60L*24L) /* one day in seconds */ ! 23: #define SECPERHR (60L*60L) /* one hour in seconds */ ! 24: #define SECPERMN (60L) /* one minute in seconds */ ! 25: ! 26: /* date doesn't understand daylight savings time (it was built in */ ! 27: /* Indiana where we're smart enough to realize that renumbering */ ! 28: /* doesn't save anything). However, the local time zone can be */ ! 29: /* set to EST, CST, MST,or PST. */ ! 30: ! 31: #define ZONE_EST 5 /* Eastern Standard time is 5 */ ! 32: #define ZONE_CST 6 /* hours west of England */ ! 33: #define ZONE_MST 7 ! 34: #define ZONE_PST 8 ! 35: #define TIMEZONE ZONE_EST /* timezone for this system */ ! 36: ! 37: /* In-line procedure that converts universal time to local time */ ! 38: ! 39: #define ut2ltim(x) ((x)-TIMEZONE*SECPERHR) ! 40: #ifndef TSERVER ! 41: #define TSERVER "128.10.2.3:37" ! 42: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.