6 ** If the following is #defined, a timezone given as a numeric-only
7 ** offset will be treated specially if it's in a zone that observes
8 ** Daylight Saving Time. For instance, during DST, a Date: like "Mon,
9 ** 24 Jul 2000 12:31:44 -0700" will be printed as "Mon, 24 Jul 2000
10 ** 12:31:44 PDT". Without the code activated by the following #define,
11 ** that'd be incorrectly printed as "...MST".
13 #define ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST 1
16 int tw_sec; /* seconds after the minute - [0, 61] */
17 int tw_min; /* minutes after the hour - [0, 59] */
18 int tw_hour; /* hour since midnight - [0, 23] */
19 int tw_mday; /* day of the month - [1, 31] */
20 int tw_mon; /* months since January - [0, 11] */
21 int tw_year; /* 4 digit year (ie, 1997) */
22 int tw_wday; /* days since Sunday - [0, 6] */
23 int tw_yday; /* days since January 1 - [0, 365] */
25 time_t tw_clock; /* if != 0, corresponding calendar value */
29 #define TW_NULL 0x0000
31 #define TW_SDAY 0x0003 /* how day-of-week was determined */
32 #define TW_SNIL 0x0000 /* not given */
33 #define TW_SEXP 0x0001 /* explicitly given */
34 #define TW_SIMP 0x0002 /* implicitly given */
36 #define TW_SZONE 0x0004 /* how timezone was determined */
37 #define TW_SZNIL 0x0000 /* not given */
38 #define TW_SZEXP 0x0004 /* explicitly given */
40 #define TW_DST 0x0010 /* daylight savings time */
41 #define TW_ZONE 0x0020 /* use numeric timezones only */
43 #define TW_SUCC 0x0040 /* whether parsing was successful */
44 #define TW_YES 0x0040 /* yes, found */
45 #define TW_NO 0x0000 /* no, not found */
47 #define dtwszone(tw) dtimezone(tw->tw_zone, tw->tw_flags)
49 extern char *tw_dotw[];
50 extern char *tw_ldotw[];
51 extern char *tw_moty[];
56 char *dtime(time_t *, int);
58 char *dctime(struct tws *);
59 struct tws *dlocaltimenow(void);
60 struct tws *dlocaltime(time_t *);
61 struct tws *dgmtime(time_t *);
62 char *dasctime(struct tws *, int);
63 char *dtimezone(int, int);
64 void twscopy(struct tws *, struct tws *);
65 int twsort(struct tws *, struct tws *);
66 time_t dmktime(struct tws *);
67 void set_dotw(struct tws *);
69 struct tws *dparsetime(char *);