ANSI C.
Jeff Makey
Makey at logicon.arpa
Sat Nov 23 10:51:46 AEST 1985
The daylight time flag returned by localtime() does NOT have to be
provided by the operating system. I looked at the 10-year-old source
code on my PDP-11/70 PWB UNIX system (no environment variables) and
observed that localtime() *computes* whether or not the date it is
processing is between the last Sundays in April and October. The ONLY
input to localtime() (it makes no system calls) is a GMT date/time
value that is immediately converted to local standard time, then to
daylight time if appropriate. There are static variables that are
hard-coded to indicate: the difference in hours between GMT and local
standard time; and whether or not conversion to daylight time should
ever occur (useful throughout most of Indiana, where they are always on
eastern standard time).
:: Jeff Makey
Makey at LOGICON.ARPA
More information about the Comp.lang.c
mailing list