From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#13982: 24.2; Bug in function format-time-string when used under Windows Date: Tue, 19 Mar 2013 22:58:04 +0200 Message-ID: <838v5j150j.fsf@gnu.org> References: <837gl53ltt.fsf@gnu.org> <83fvzr1fwr.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1363726790 12505 80.91.229.3 (19 Mar 2013 20:59:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Mar 2013 20:59:50 +0000 (UTC) Cc: 13982@debbugs.gnu.org To: Bostjan Vilfan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 19 22:00:15 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UI3di-0002lG-BD for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Mar 2013 22:00:10 +0100 Original-Received: from localhost ([::1]:37619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI3dL-00085k-AT for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Mar 2013 16:59:47 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI3d1-0007TY-RF for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2013 16:59:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UI3cv-0007gB-Ex for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2013 16:59:27 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI3cv-0007fy-Ax for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2013 16:59:21 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UI3eX-0000Ki-Q0 for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2013 17:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Mar 2013 21:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13982 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13982-submit@debbugs.gnu.org id=B13982.13637268451250 (code B ref 13982); Tue, 19 Mar 2013 21:01:01 +0000 Original-Received: (at 13982) by debbugs.gnu.org; 19 Mar 2013 21:00:45 +0000 Original-Received: from localhost ([127.0.0.1]:36185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UI3eG-0000K6-Vl for submit@debbugs.gnu.org; Tue, 19 Mar 2013 17:00:45 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:56818) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UI3eF-0000Jz-97 for 13982@debbugs.gnu.org; Tue, 19 Mar 2013 17:00:44 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MJX00C00DU8KN00@a-mtaout22.012.net.il> for 13982@debbugs.gnu.org; Tue, 19 Mar 2013 22:57:53 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MJX00CQ9E8GP600@a-mtaout22.012.net.il>; Tue, 19 Mar 2013 22:57:53 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72722 Archived-At: > Date: Tue, 19 Mar 2013 22:08:25 +0200 > From: Bostjan Vilfan > Cc: 13982@debbugs.gnu.org > > On Tue, Mar 19, 2013 at 7:02 PM, Eli Zaretskii wrote: > >> Date: Tue, 19 Mar 2013 12:56:30 +0200 > >> From: Bostjan Vilfan > >> Cc: 13982@debbugs.gnu.org > >> > >> Hello, and thanks for your message. I did as per your instructions, > >> and the value of > >> > >> (format-time-string "%H:%M %z %Z") > >> > >> is "12:30 +0200 CDT" (actual local time was 11:30; so in other words > >> emacs thinks local time is 1 hour ahead of actual local time) > >> > >> Your remark that all your Windows machines give the correct answer > >> indicates that there must be some settings on my computer that is at > >> fault; but I have no idea what that is. > > > > I don't think there's a Windows time zone whose name is "CDT". Can > > you check if you happen to have a TZ variable in the environment, and > > if so, what's its value? Please look both in the Computer's > > Properties and in the command shell from which you invoke "emacs -Q". > > > TZ=CET-1CDT,3,-1,0,7200,10,-1,0,10800,3600 That's your problem, right there: unset that variable, and Emacs will show the correct time. The Windows runtime library includes semi-broken support for setting TZ, but it only supports the "CET-1CDT" part of the value, and so switches to daylight savings not on the date that the rest of your value provides, but uses some internal default dates. See also this KB article: http://support.microsoft.com/kb/932590 > the reason I need TZ is that I still use the (quite old) RCS software. There's a newer one here: http://sourceforge.net/projects/ezwinports/files/rcs-5.7-1-bin.zip/download I use it all the time, and never needed any TZ setting. > > Also, I asked you to tell which time zone do you see in the Date/Time > > dialog of your Windows system. Right-click on the time display in the > > right corner of your task bar, and select "Adjust date/time". In the > > dialog that pops, click "Change timezone", and tell the name of your > > current Windows time zone that is shown in the middle of the dialog. > > > > If the Windows time zone and the time zone given to Emacs are > > different, you can have all kinds of "1 hour off" problems, especially > > around daylight savings change date. > > > there is no abbreviation, just the following: > > (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna This is what %Z should produce in Emacs. And it will, after you unset TZ in the environment. > I hope I answered your specific questions above. There is one item > that comes to mind, though, which I don't know whether it is evident > in the data in my original error report, namely, that my system is > 64-bit Windows 7. I also have a 32-bit Windows 7 installation, but > currently I am unable to access it. As soon as I will be able to do > so, I will check how emacs behaves there. 32-bit vs 64-bit is not a factor here. The problems you have happen because you have TZ set in the environment.