--On Thursday, June 16, 2005 09:14:21 +0200 Rainer Toebbicke <[EMAIL PROTECTED]> wrote:
+ TimeZoneCorrection = daylight ? altzone : timezone;
I do not believe this is correct. daylight is true if altzone is defined, not if altzone is the right thing to use now.
posix: "The tzset() function also shall set the external variable daylight to 0 if Daylight Savings Time conversions should never be applied for the timezone in use; otherwise, non-zero. "
linux: "Note that the variable daylight does not indicate that daylight savings time applies
right now."sun's manpage is less clear: "The external variable daylight indicates whether time should reflect daylight savings time. [...] The external variable daylight is non-zero if an alternate time zone exists."
I think you need to use localtime(time(0))->tm_isdst to determine if the dst is active.
I think a better answer would be to use localtime and mktime to compute the dayusedate. That way the behavior continues to be correct if a dst transition occurs between fileserver startup and the time that VAdjustVolumeStatistics_r is called. The additional computation expense shouldn't be a big deal, since it is called a maximum of once per volume per day.
p7s4WpcWKsumb.p7s
Description: S/MIME cryptographic signature
