GNU bug report logs -
#11281
DST has not effect on windows XP when system DST adjustment is disabled
Previous Next
Full log
Message #35 received at 11281 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 23 May 2025 17:32:15 +0900
> From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
> Cc: 11281 <at> debbugs.gnu.org, stefankangas <at> gmail.com
>
> > > (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)
> (snip)
>
> > 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.
> If the former, what is proper string for ZONE on Windows?
In Emacs, the only supported TZ strings are those known to MSVCRT
time-related functions, which are of the form documented here:
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/tzset?view=msvc-170
This bug report was last modified 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.