switch to/from Daylight savings doesn't happen

2005-10-25 Thread Prakash GP
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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: switch to/from Daylight savings doesn't happen

2005-10-25 Thread Malcolm Kay
On Wed, 26 Oct 2005 09:00 am, Prakash GP wrote:
> 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
>

It would seem that the use of the TZ environment variable is 
somewhat deprecated.

I suggest you get rid of it, and then use 'tzsetup' to set your 
time zone. This is menu driven -- doesn't require command line 
arguments.

Apart from the choice of UTC or wall time for your CMOS clock,
I believe the equivalent result can be achieved by copying 
/usr/share/zoneinfo/America/Los_Angeles to /etc/localtime.


Malcolm Kay
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"