unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: schwab@linux-m68k.org, 11807@debbugs.gnu.org
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	[thread overview]
Message-ID: <83pq8i76l4.fsf@gnu.org> (raw)
In-Reply-To: <81sjdewjt9.fsf_-_@gmail.com>

> From: Jambunathan K <kjambunathan@gmail.com>
> Date: Fri, 29 Jun 2012 14:56:10 +0530
> Cc: 11807@debbugs.gnu.org
> 
> Andreas Schwab <schwab@linux-m68k.org> writes:
> 
> > Jambunathan K <kjambunathan@gmail.com> 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.





  reply	other threads:[~2012-06-29 10:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-28  8:05 bug#11807: M-x display-time-world & EDT/DST Jambunathan K
2002-01-01  0:30 ` Jambunathan K
2012-06-28  8:54 ` Andreas Schwab
2012-06-28  9:02   ` Jambunathan K
2012-06-28  9:39     ` Andreas Schwab
2012-06-28 10:00       ` Jambunathan K
2012-06-28 10:34         ` Andreas Schwab
2012-06-28 10:50           ` Jambunathan K
2012-06-28 12:18             ` Andreas Schwab
2012-06-28 13:54               ` Jambunathan K
2012-06-28 14:38                 ` Andreas Schwab
2012-06-28 14:54                   ` Jambunathan K
2012-06-28 15:37                     ` Andreas Schwab
2012-06-29  9:26                       ` bug#11807: (Windows XP issue?) " Jambunathan K
2012-06-29 10:31                         ` Eli Zaretskii [this message]
2012-06-29 10:40                           ` Jambunathan K
2012-06-30  3:37                           ` Jason Rumney
2012-06-30  5:43                             ` Jambunathan K
2012-06-30  6:13                               ` Eli Zaretskii

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=83pq8i76l4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=11807@debbugs.gnu.org \
    --cc=kjambunathan@gmail.com \
    --cc=schwab@linux-m68k.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).