[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NT-emacs current-time-zone
From: |
Eli Zaretskii |
Subject: |
Re: NT-emacs current-time-zone |
Date: |
Mon, 09 Apr 2001 21:40:45 +0200 |
> From: Cheng-Wei Wu <cheng-wei@epicsystems.com>
> Date: Mon, 9 Apr 2001 11:33:32 -0500
>
> I am running GNU emasc 20.7.1 on MS window 2000 (binary version obtained
> from GNU ftp site: emacs-20.7-bin-i386.tar.gz).
>
> The built-in function `current-time-zone' seems giving incorrect result. I
> am in Wisconsin (CST/CDT) and after April 1, 2001 (when the daylight savings
> start at 2am, April 1, 2001), it still gives CST rather than CDT. The
> window 2000 system is setup to use Central Time zone with automatically
> adjust clock for daylight saving changes.
>
> On April 2, 2001, my window 2000 system was already switched to CDT:
>
> (current-time-zone) gives result of "(-21600 "Central Standard Time)" rather
> then the expected "(-18000 "Central Daylight Time")".
>
> Debug info:
>
> (setq t0 (current-time))
> (15048 58421 736000)
>
> (setq t0-zone (current-time-zone t0))
> (-21600 "Central Standard Time")
>
> (setq t1 (calendar-next-time-zone-transition t0))
> (15056 . 6784) >>>>> This means April 8, 2001 is the next time change.
> So it expects to switch to CDT on April 8, 2001?
>
> Wait until it past April 8, 2001, then it showed the time in CDT:
>
> (current-time-zone)
> (-18000 "Central Daylight Time")
This is a known bug in Windows run-time libraries; Emacs is just
unfortunate enough to use them ;-) See:
http://msdn.microsoft.com/visualc/headlines/2001.asp