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#11807: (Windows XP issue?) Re: bug#11807: M-x display-time-world & EDT/DST Date: Fri, 29 Jun 2012 13:31:03 +0300 Message-ID: <83pq8i76l4.fsf@gnu.org> References: <81lij7lv4b.fsf@gmail.com> <814npvkdwo.fsf@gmail.com> <81k3yrn4cx.fsf@gmail.com> <81a9znn20v.fsf@gmail.com> <81pq8jbkzr.fsf@gmail.com> <81hatvbi7i.fsf@gmail.com> <81sjdewjt9.fsf_-_@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1340965923 29202 80.91.229.3 (29 Jun 2012 10:32:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 29 Jun 2012 10:32:03 +0000 (UTC) Cc: schwab@linux-m68k.org, 11807@debbugs.gnu.org To: Jambunathan K Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 29 12:32:00 2012 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 1SkYUV-0001gV-7u for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Jun 2012 12:31:55 +0200 Original-Received: from localhost ([::1]:45104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkYUV-0004tC-3x for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Jun 2012 06:31:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkYUR-0004sX-PS for bug-gnu-emacs@gnu.org; Fri, 29 Jun 2012 06:31:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SkYUL-00063n-9F for bug-gnu-emacs@gnu.org; Fri, 29 Jun 2012 06:31:51 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55139) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkYUL-00063h-5f for bug-gnu-emacs@gnu.org; Fri, 29 Jun 2012 06:31:45 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SkYYT-0008Iu-KM for bug-gnu-emacs@gnu.org; Fri, 29 Jun 2012 06:36:01 -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: Fri, 29 Jun 2012 10:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11807 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11807-submit@debbugs.gnu.org id=B11807.134096612631881 (code B ref 11807); Fri, 29 Jun 2012 10:36:01 +0000 Original-Received: (at 11807) by debbugs.gnu.org; 29 Jun 2012 10:35:26 +0000 Original-Received: from localhost ([127.0.0.1]:36452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SkYXt-0008I8-Lm for submit@debbugs.gnu.org; Fri, 29 Jun 2012 06:35:26 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:43646) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SkYXq-0008Hz-IF for 11807@debbugs.gnu.org; Fri, 29 Jun 2012 06:35:24 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0M6D00M00JSR9H00@a-mtaout20.012.net.il> for 11807@debbugs.gnu.org; Fri, 29 Jun 2012 13:31:03 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M6D00MXHJVR1N40@a-mtaout20.012.net.il>; Fri, 29 Jun 2012 13:31:03 +0300 (IDT) In-reply-to: <81sjdewjt9.fsf_-_@gmail.com> 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 (newer, 2) 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:61406 Archived-At: > From: Jambunathan K > Date: Fri, 29 Jun 2012 14:56:10 +0530 > Cc: 11807@debbugs.gnu.org > > Andreas Schwab writes: > > > Jambunathan K writes: > > > >>> What about (progn (setenv "TZ" "CET-1CEST") (calendar-dst-find-data))? > >> > >> (60 0 "CES" "CES" nil nil 0 0) > > > > That's your problem. You have a faulty timezone implementation. I don't think the MS-Windows version of tzset supports TZ values such as CET-1CEST. The time-zone strings it supports need to be 3-letter, not 4-letter. See this thread for more: http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00991.html Since the original report didn't mention CET-1CEST, the results above might not be relevant to the original problem at all. FWIW, times displayed by display-time-world on my XP SP3 box coincide with what http://www.timeanddate.com/worldclock/city.html?n=179 shows for the respective cities. This is with today's trunk. So maybe your system's MSVCRT.DLL needs to be updated wrt the timezone information (see below). > With my machine re-configured to use a remote timezone (as below) > > ,---- (Windows XP/Cygwin) Control Panel->"Date and Time" > | > | (GMT-5:00) Eastern Time (US and Canada) and > | Automatically adjust clock for daylight saving changes turned ON > | > | I also have my "Internet Time" automatically synchronize with > | time.windows.com time server. > `---- In what build of Emacs was the original problem detected? What is the value of 'system-configuration' and 'system-configuration-options' in that build? And which Emacs version is that? You didn't say all that in your original report, AFAICT. If the problem is not in the Windows native (MinGW or MSVC) build of Emacs, then all I write here is irrelevant. > It is difficult to digest an argument that a widely used enterprise > system such as Windows XP has an obviously buggy implementation. It is > quite possible that Emacs is using the platform APIs in wrong manner. > > What library call (dll library) that Emacs uses to fetch time info? If you are using a Cygwin build of Emacs, the information comes from newlib, and you should ask this question on the Cygwin list; disregard all I said in that case. If you are using the native Windows build, then the information comes from MSVCRT.DLL, the Microsoft C runtime library. It is known that _tzset and related time functions in MSVCRT implement only a subset of possible time-zone names, and they do the time-zone calculations in a simplistic manner, separately from a much more complete implementation in the Win32 APIs, such as GetTimeZoneInformation, which is used by the OS itself for displaying local time. There's an entry in etc/PROBLEMS about that, search for "timezone". In addition, depending on the system updates installed on your machine, it is possible that the latest updates for MSVCRT need to be installed to account for the change in US timezones a few years ago, when they switched from fixed dates for DST change to rule-based dates. Volunteers are welcome to write a custom implementation of _tzset that uses those APIs.