X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/5f80fdd1ec6888f34af829208fd90fb9716ac289..62ee157e2dd14a1aec566d0370a1275654abd143:/h/tws.h diff --git a/h/tws.h b/h/tws.h index 83ec8806..9e0f9b64 100644 --- a/h/tws.h +++ b/h/tws.h @@ -1,12 +1,12 @@ - -/* - * tws.h - * - * $Id$ +/* tws.h -- time routines. */ -/* DST vs. GMT nonsense */ -#define DSTXXX +/* If the following is #defined, a timezone given as a numeric-only offset will + be treated specially if it's in a zone that observes Daylight Saving Time. + For instance, during DST, a Date: like "Mon, 24 Jul 2000 12:31:44 -0700" will + be printed as "Mon, 24 Jul 2000 12:31:44 PDT". Without the code activated by + the following #define, that'd be incorrectly printed as "...MST". */ +#define ADJUST_NUMERIC_ONLY_TZ_OFFSETS_WRT_DST 1 struct tws { int tw_sec; /* seconds after the minute - [0, 61] */ @@ -36,9 +36,7 @@ struct tws { #define TW_DST 0x0010 /* daylight savings time */ #define TW_ZONE 0x0020 /* use numeric timezones only */ -#define TW_SUCC 0x0040 /* whether parsing was successful */ -#define TW_YES 0x0040 /* yes, found */ -#define TW_NO 0x0000 /* no, not found */ +#define TW_SUCC 0x0040 /* Parsing was successful. */ #define dtwszone(tw) dtimezone (tw->tw_zone, tw->tw_flags) @@ -63,4 +61,3 @@ time_t dmktime (struct tws *); void set_dotw (struct tws *); struct tws *dparsetime (char *); -