We need to set tm_isdst to -1 so that mktime will automatically
determine whether or not daylight savings time (DST) is in effect.
Previously tm_isdst was set to 0, which caused mktime to interpret the
time as if it was always not using DST.
Addresses-Debian-Bug: #471882
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
ts.tm_min > 59 || ts.tm_sec > 61)
ts.tm_mday = 0;
#endif
+ ts.tm_isdst = -1;
ret = mktime(&ts);
if (ts.tm_mday == 0 || ret == ((time_t) -1)) {
/* Try it as an integer... */
str);
usage();
}
+ ts.tm_isdst = -1;
return (mktime(&ts));
}