Subject: bug#11281: DST has not effect on windows XP when system DST adjustment is disabled

From: Kazuhiro Ito <[email-masked]>
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