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>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11281 in the body.
You can then email your comments to 11281 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11281; Package emacs. (Thu, 19 Apr 2012 16:46:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Shuguang Sun <shuguang <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 19 Apr 2012 16:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: DST has not effect on windows XP when system DST adjustment is
	disabled
Date: Fri, 20 Apr 2012 00:35:40 +0800
I'm using GNU Emacs 24.0.95.1 (i386-mingw-nt5.1.2600) of 2012-04-02 on
MARVIN on WindowsXP SP3. I believe the issue exists in other version
as well.

In windows,
1. If I select the time zone GMP-5 EST (East Standard Time) and  check
the enable Daylight Saving Time checkbox, the command
display-time-world in emacs can show the time of New York correctly
with DST.
2. If I select the time zone GMP-5 EST (East Standard Time) and
UNCHECK the enable Daylight Saving Time checkbox, or if I select a
time zone without DST, the command display-time-world in emacs can not
show the time of New York correctly with DST.
But actually the display-time-world-list for New York is ("EST5EDT"
"New York"), which (EST5EDT) supposes to enable the Daylight Saving
Time to show the time.

I try the following code to trace the issue:
(setq old-tz (getenv "TZ"))
(setenv "TZ" "EST+5EDT")
(message (format "%s" (getenv "TZ")))
(message (format-time-string "%A %d %B %R %Z"))
(decode-time)
(setenv "TZ" "EST+5")
(message (format "%s" (getenv "TZ")))
(message (format-time-string "%A %d %B %R %Z"))
(decode-time)
(setenv "TZ" old-tz)

The output is (Because I select a timezone without DST in windows, the
time in the outputs is no DST as I described above):
"EST+5EDT"
"Thursday 19 April 11:27 EDT"
(26 27 11 19 4 2012 4 t -18000)

"EST+5"
"Thursday 19 April 11:27 EST"
(34 27 11 19 4 2012 4 nil -18000)

(DST is t if daylight saving time is in effect,otherwise nil.from the
doc of decode-time) From the output of decode-time, it is clear that
if the TZ is set to "EST+5EDT", the DST is effect. So it is most
likely the function format-time-string can not catch this information.
But it is still weird that it DOES has effect if I enable the DST in
the Windows system.




Merged 11281 11807. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 24 Oct 2012 16:13:01 GMT) Full text and rfc822 format available.

Disconnected #11281 from all other report(s). Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 15 Nov 2013 08:07:02 GMT) Full text and rfc822 format available.

Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 15 Nov 2013 08:07:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11281; Package emacs. (Fri, 01 Nov 2019 19:55:02 GMT) Full text and rfc822 format available.

Message #14 received at 11281 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: 11281 <at> debbugs.gnu.org
Subject: Re: DST has not effect on windows XP when system DST adjustment is
 disabled
Date: Fri, 01 Nov 2019 20:54:17 +0100
Shuguang Sun <shuguang <at> gmail.com> writes:

> I'm using GNU Emacs 24.0.95.1 (i386-mingw-nt5.1.2600) of 2012-04-02 on
> MARVIN on WindowsXP SP3. I believe the issue exists in other version
> as well.
>
> In windows,
> 1. If I select the time zone GMP-5 EST (East Standard Time) and  check
> the enable Daylight Saving Time checkbox, the command
> display-time-world in emacs can show the time of New York correctly
> with DST.
> 2. If I select the time zone GMP-5 EST (East Standard Time) and
> UNCHECK the enable Daylight Saving Time checkbox, or if I select a
> time zone without DST, the command display-time-world in emacs can not
> show the time of New York correctly with DST.
> But actually the display-time-world-list for New York is ("EST5EDT"
> "New York"), which (EST5EDT) supposes to enable the Daylight Saving
> Time to show the time.
>
> I try the following code to trace the issue:
> (setq old-tz (getenv "TZ"))
> (setenv "TZ" "EST+5EDT")
> (message (format "%s" (getenv "TZ")))
> (message (format-time-string "%A %d %B %R %Z"))
> (decode-time)
> (setenv "TZ" "EST+5")
> (message (format "%s" (getenv "TZ")))
> (message (format-time-string "%A %d %B %R %Z"))
> (decode-time)
> (setenv "TZ" old-tz)
>
> The output is (Because I select a timezone without DST in windows, the
> time in the outputs is no DST as I described above):
> "EST+5EDT"
> "Thursday 19 April 11:27 EDT"
> (26 27 11 19 4 2012 4 t -18000)
>
> "EST+5"
> "Thursday 19 April 11:27 EST"
> (34 27 11 19 4 2012 4 nil -18000)
>
> (DST is t if daylight saving time is in effect,otherwise nil.from the
> doc of decode-time) From the output of decode-time, it is clear that
> if the TZ is set to "EST+5EDT", the DST is effect. So it is most
> likely the function format-time-string can not catch this information.
> But it is still weird that it DOES has effect if I enable the DST in
> the Windows system.

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?

Best regards,
Stefan Kangas




Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Fri, 07 Aug 2020 11:14:02 GMT) Full text and rfc822 format available.

Notification sent to Shuguang Sun <shuguang <at> gmail.com>:
bug acknowledged by developer. (Fri, 07 Aug 2020 11:14:02 GMT) Full text and rfc822 format available.

Message #19 received at 11281-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: 11281-done <at> debbugs.gnu.org
Subject: Re: bug#11281: DST has not effect on windows XP when system DST
 adjustment is disabled
Date: Fri, 7 Aug 2020 04:12:57 -0700
Stefan Kangas <stefan <at> marxist.se> writes:

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

Best regards,
Stefan Kangas




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 04 Sep 2020 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 233 days ago.

Previous Next


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