switch to/from Daylight savings doesn't happen
Prakash GP
gouda422 at yahoo.com
Tue Oct 25 16:30:38 PDT 2005
Hi,
FreeBSD 4.5 doesn't seem to auto-switch to/from DST at the right
time.
----------%<----------%<----------%<----------%<----------%<----------
# setenv TZ :/usr/share/zoneinfo/America/Los_Angeles
# /bin/date
Tue Oct 25 15:40:10 PDT 2005
# /bin/date 200510300159
Sun Oct 30 01:59:00 PST 2005 <-- should be PDT ?
----------%<----------%<----------%<----------%<----------%<----------
Oct 30, 1:59 falls under PDT, instead `date` command returns PST.
I am sure I have the right tzfile.
The following change in date.c seems to fix the problem; the PDT->PST
switch happens automatically at oct 30 2.00am. Not sure if that's the
way to fix it.
Index: date.c
===================================================================
@@ -270,8 +270,6 @@ setthetime(fmt, p, jflag, nflag)
}
}
- /* Let mktime() decide whether summer time is in effect. */
- lt->tm_isdst = -1;
/* convert broken-down time to GMT clock time */
if ((tval = mktime(lt)) == -1)
Thanks,
Prakash
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
More information about the freebsd-questions
mailing list