GNU bug report logs - #11281
DST has not effect on windows XP when system DST adjustment is disabled

Previous Next

Package: emacs;

Reported by: Shuguang Sun <shuguang <at> gmail.com>

Date: Thu, 19 Apr 2012 16:46:01 UTC

Severity: minor

Done: Stefan Kangas <stefan <at> marxist.se>

Full log


View this message in rfc822 format

From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11281 <at> debbugs.gnu.org, stefankangas <at> gmail.com
Subject: bug#11281: DST has not effect on windows XP when system DST adjustment is disabled
Date: Fri, 23 May 2025 22:39:51 +0900
> > > > > My suggestion therefore is not to try such tricks in Emacs on Windows,
> > > > > and not to expect that to produce results that are as accurate as on
> > > > > Posix platforms.
> > > > 
> > > > Thank you for the comment.
> > > > What do you mean by 'such tricks'?  Using traditional timezone name or
> > > > using string as a ZONE pamareter?
> > > 
> > > Neither.  By "tricks" I meant unchecking the DST option in the Windows
> > > Control Panel.
> > 
> > I live in Japan and when I set timezone to Japanese Standard Time in
> > the Windows Control Panel, DST option doesn't appear.  Emacs behaves
> > as if unchecking the DST option.  So, I think many user do the same
> > with unchecking the DST option.
> 
> I was talking about unchecking an option when it does exist and is ON
> by default.

Yes, I know.  I didn't mention in the case of timezone which didn't
have DST, because I didn't expect you suggested not to disable DST.
I live without DST, so I don't know how uncommon to uncheck DST option
is.

> Do the problems mentioned in this bug happen when you use Emacs?  If
> so, can you show a recipe which involves only Emacs, and does not
> touch any TZ settings in the Windows Control Panel?

1. Set timezone to Japanese Standard Time (at UTC+09:00, Osaka,
Sapporo, Tokyo) in the Windows Control Panel.  DST option doesn't
apprear.

2. emacs -Q

3. Evaluate below code.

(let ((time (encode-time '(0 0 12 20 5 2025 nil nil t))))
  (setenv "TZ" nil)
  (decode-time time "est5edt"))

Expected result: (0 0 8 20 5 2025 2 t -14400)
Actual result:   (0 0 7 20 5 2025 2 t -18000)

As far as I tested, the result depends on whether DST is enabled in
the Windows Control Panel at the time of evaluating `(setenv "TZ"
nil)'.  In the case of Windows timezone which doesn't have DST, the
result is the same with unchecking DST option.

-- 
Kazuhiro Ito




This bug report was last modified 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.