unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Shuguang Sun <shuguang@gmail.com>
To: 11281@debbugs.gnu.org
Subject: bug#11281: DST has not effect on windows XP when system DST adjustment is disabled
Date: Fri, 20 Apr 2012 00:35:40 +0800	[thread overview]
Message-ID: <CACspjXd6GzohBiunuxrnPn1cL+sGoFdKdK=JLKMQRzhAQ+CFMA@mail.gmail.com> (raw)

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.





             reply	other threads:[~2012-04-19 16:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 16:35 Shuguang Sun [this message]
2019-11-01 19:54 ` bug#11281: DST has not effect on windows XP when system DST adjustment is disabled Stefan Kangas
2020-08-07 11:12   ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACspjXd6GzohBiunuxrnPn1cL+sGoFdKdK=JLKMQRzhAQ+CFMA@mail.gmail.com' \
    --to=shuguang@gmail.com \
    --cc=11281@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).