From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#11281: DST has not effect on windows XP when system DST adjustment is disabled Date: Fri, 01 Nov 2019 20:54:17 +0100 Message-ID: <87pnibxthy.fsf@marxist.se> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="24324"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 11281@debbugs.gnu.org To: Shuguang Sun Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 01 20:55:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iQd0q-0006CY-E0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 20:55:12 +0100 Original-Received: from localhost ([::1]:42480 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQd0o-0003ZL-Ad for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 15:55:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37891) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQd0i-0003ZA-65 for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 15:55:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQd0g-0005Dj-Ni for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 15:55:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48398) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQd0g-0005DZ-Jk for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 15:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iQd0g-0000PQ-GI for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 15:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Nov 2019 19:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11281 X-GNU-PR-Package: emacs Original-Received: via spool by 11281-submit@debbugs.gnu.org id=B11281.15726380681499 (code B ref 11281); Fri, 01 Nov 2019 19:55:02 +0000 Original-Received: (at 11281) by debbugs.gnu.org; 1 Nov 2019 19:54:28 +0000 Original-Received: from localhost ([127.0.0.1]:57219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQd08-0000O7-99 for submit@debbugs.gnu.org; Fri, 01 Nov 2019 15:54:28 -0400 Original-Received: from host.gofardesign.uk ([208.79.239.190]:37175) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQd06-0000Nq-D0 for 11281@debbugs.gnu.org; Fri, 01 Nov 2019 15:54:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PU/KclOZ2xfedN2XXBqa4n8SpZSfIgPJ+9uXGiGKKHw=; b=pcSxjMvW4ziBpXGqE7yDF3kD6P CSLWkFleLduWlp9BTQnLgvlxqscTtvdNvsuuLWefUdaG5cAkvim5pn5S4FlYMi7/ANhApsnuIDxh6 o/46SEdgk1q+ewHnXJWlcWkxPih9OzdeCeNEkD3/bFVRGX+6Nr0Ti5/x/9yssLlQDuWc=; Original-Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:55010 helo=localhost) by host.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iQczz-00079P-Jj; Fri, 01 Nov 2019 14:54:20 -0500 In-Reply-To: (Shuguang Sun's message of "Fri, 20 Apr 2012 00:35:40 +0800") X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: host.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: host.gofardesign.uk: stefan@marxist.se X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170664 Archived-At: Shuguang Sun 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