Bug in encode-time on Windows 2000/XP
David Byers <[email protected]> 04 Jun 2004 13:00:21 +0200
| Newsgroups | gmane.emacs.xemacs.windows,gmane.emacs.xemacs.beta |
|---|---|
| Message-ID | <[email protected]> |
I e-mailed this three days ago, but it doesn't appear to be in the
archives, so I'm trying again.
There is a problem with encode-time on Windows:
(encode-time 0 0 0 1 1 1970 0)
causes an error "Specified time is not representable", at least when
the computer is set to time zone western Europe (GMT+1). Setting the
machine's time zone to GMT before starting XEmacs causes this call to
work.
The expected result is '(0 0) regardless of the current time zone
setting, not an error.
Furthermore, calling
(set-time-zone-rule "GMT")
does not seem to affect the time zone (I have tried with a number of
different formats). Following the call to set-time-zone-rule,
current-time-zone still returns the old time zone and decode-time
still decodes using the old time zone.
The ability to use encode-time as advertised is a critical for me as I
have users on Windows to support and a network protocol that requires
timestamps in UTC.
Is there a workaround?
XEmacs version 21.4.13, downloaded from ftp.se.xemacs.org at about
12:40 on June 1, 2004. Sorry I can't use report-xemacs-bug, but my
Windows machine doesn't do email.
The problem has been verified on Windows XP and Windows 2000, but does
not seem to exist on Linux and does not exist in Gnu Emacs 21.2 on
either platform.
--
David Byers.