📄 date.h,v
字号:
head 1.2;
access;
symbols;
locks
dls:1.2; strict;
comment @ * @;
1.2
date 97.09.21.19.26.19; author dls; state Dist;
branches;
next 1.1;
1.1
date 94.05.10.20.48.46; author dls; state Old;
branches;
next ;
desc
@@
1.2
log
@pre-3e code
@
text
@/* date.h - net2xt, xt2net, isleap, ut2ltim */
/* Xinu stores time as seconds past Jan 1, 1970 (UNIX format), with */
/* 1 being 1 second into Jan. 1, 1970, GMT (universal time). The */
/* Internet uses seconds past Jan 1, 1900 (also GMT or universal time) */
#define net2xt(x) ((x)-2208988800L) /* convert net-to-xinu time */
#define xt2net(x) ((x)+2208988800L) /* convert xinu-to-net time */
/* Days in months and month names used to format a date */
struct datinfo {
int dt_msize[12];
char *dt_mnam[12];
};
extern struct datinfo Dat;
/* Constants for converting time to month/day/year/hour/minute/second */
#define isleap(x) ((x)%4==0) /* leap year? (1970-1999) */
#define SECPERDY (60L*60L*24L) /* one day in seconds */
#define SECPERHR (60L*60L) /* one hour in seconds */
#define SECPERMN (60L) /* one minute in seconds */
/* date doesn't understand daylight savings time (it was built in */
/* Indiana where we're smart enough to realize that renumbering */
/* doesn't save anything). However, the local time zone can be */
/* set to EST, CST, MST,or PST. */
#define ZONE_EST 5 /* Eastern Standard time is 5 */
#define ZONE_CST 6 /* hours west of England */
#define ZONE_MST 7
#define ZONE_PST 8
#define TIMEZONE ZONE_EST /* timezone for this system */
/* In-line procedures to convert universal-to-local time and vice versa */
#define ut2ltim(x) ((x)-TIMEZONE*SECPERHR)
#define ltim2ut(x) ((x)+TIMEZONE*SECPERHR)
#ifndef TSERVER
#define TSERVER "128.10.2.3:37"
#endif
@
1.1
log
@Initial revision
@
text
@@
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -