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: 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: Tue, 20 May 2025 20:28:31 +0900
> > This was reported 7 years ago, but unfortunately never got a reply at
> > the time.
> >
> > Is this still an issue on modern versions of Emacs?
> 
> More information was requested, but none was given within 39 weeks, so
> I'm closing this bug.  If this is still an issue, please reply to this
> email (use "Reply to all" in your email client) and we can reopen the
> bug report.

As far as I tested, the problem still exists on master branch.

(let ((time (encode-time '(0 0 12 20 5 2025 nil nil t))))
  ;; The result depends on whether DST is enabled on Windows timezone
  ;; setting at the time of evaluating `(setenv "TZ" nil)'.
  (setenv "TZ" nil)
  (decode-time time "est5edt"))

;; The case that DST is disabled on Windows control panel.
-> (0 0 7 20 5 2025 2 t -18000)

;; DST is enabled.
-> (0 0 8 20 5 2025 2 t -14400)

If you start emacs with TZ environmental variable specifying timzone and
never call (setenv "TZ" nil), the problem seems not to appear.

-- 
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.