Questions about mktime()
David Tanguay
datangua at watmath.waterloo.edu
Mon Jan 21 22:52:49 AEST 1991
In article <1991Jan20.205039.7056 at sq.sq.com> msb at sq.sq.com (Mark Brader) writes:
|The rule is that if tm_isdst is positive, you have to assume Daylight
|Saving Time; if zero, you have to assume Standard Time; if negative, you
|have to "attempt to determine whether Daylight Saving Time is in effect
|for the specific time".
[...]
|One way to do this would be to first assume Standard Time, adjusting
|the computed time by 3600 seconds if tm_isdst was positive; then call
^^^^
|localtime() on the computed time, and see what it gives for tm_isdst;
|if it's 1, adjust the computed time by 3600 seconds and call localtime()
|again. If tm_isdst was originally positive or zero, you're done.
Now what do we do with the double DST that Newfoundland has/had?
Not only do you have to figure out if DST is in effect, you have to figure
out exactly how much of a time shift DST represents.
--
David Tanguay Software Development Group, University of Waterloo
More information about the Comp.std.c
mailing list