From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/24190 Path: main.gmane.org!not-for-mail From: Toby Speight Newsgroups: gmane.emacs.gnus.general Subject: Re: Time zone and 'lapsed under NT Date: 12 Jul 1999 19:37:10 +0100 Organization: Citrix Systems (Cambridge) Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035161799 7345 80.91.224.250 (21 Oct 2002 00:56:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:56:39 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id OAA08542 for ; Mon, 12 Jul 1999 14:46:25 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.1/8.9.1) with ESMTP id NAB16546; Mon, 12 Jul 1999 13:46:00 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 12 Jul 1999 13:46:24 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id NAA21750 for ; Mon, 12 Jul 1999 13:46:14 -0500 (CDT) Original-Received: from ironside.ansa.co.uk (ironside.ansa.co.uk [192.5.254.44]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id OAA08501 for ; Mon, 12 Jul 1999 14:45:11 -0400 (EDT) Original-Received: from lanber.cam.citrix.com (LANBER.ansa.co.uk [10.70.1.235]) by ironside.ansa.co.uk (Netscape Mail Server v2.02) with ESMTP id AAA532 for ; Mon, 12 Jul 1999 19:41:54 +0100 Original-To: ding@gnus.org Original-Lines: 66 In-Reply-To: Lars Magne Ingebrigtsen's message of "Fri, 09 Jul 1999 21:02:11 GMT" X-Author-Info: Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:24190 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:24190 Lars> Lars Magne Ingebrigtsen 0> Toby Speight writes: >> The Emacs documentation doesn't describe (current-time) very well. It >> says, "the current time, as the number of seconds since 1970-01-01 >> 00:00:00" - without specifying a time zone for that epoch... 0> In , Lars wrote: Lars> (current-time-string (current-time)) Lars> => "Fri Jul 9 22:59:05 1999" Lars> Lars> which is the local time, here, now. (After fixing the clock.) (current-time) => (14218 11870 732000) (current-time-string '(14218 11870 732000)) => "Mon Jul 12 19:05:18 1999" That's local time for me, too (on NT). What I'm not sure about is whether the representation of (current-time) is the same on both platforms; it's possible that it is seconds-after-local-epoch on one platform and seconds-after-UT-epoch on the other. If (current-time-string) matches, you'd only see the difference if (a) you transfer numeric times between the platforms or (b) you build a numeric time from something other than (current-time). We're doing (b). Just a theory. Can you report what (current-time-string '(14218 11870 732000)) gives you? Lars> But what am I getting at? Uhm -- perhaps the bug isn't in the Lars> generating-the-Data-header part, but in the parsing part? I think perhaps it is: (date-to-time "Thu, 01 Jan 1970 02:00:00 GMT") => (0 7200) (date-to-time "Thu, 01 Jan 1970 02:00:00 EST") => (0 7200) but: (parse-time-string "Thu, 01 Jan 1970 02:00:00 GMT") => (0 0 2 1 1 1970 4 (0) 0) (parse-time-string "Thu, 01 Jan 1970 02:00:00 EST") => (0 0 2 1 1 1970 4 (-18000) -18000) So I suspect date-to-time, which is basically a wrapper around encode-time. encode-time is a built-in function, so if this is broken, it's an NTEmacs bug. BTW, I'm on GNU Emacs 20.3.1 (i386-*-nt4.0). Checking: (encode-time 0 0 2 1 1 1970 4 '(0) 0) => (0 7200) (encode-time 0 0 2 1 1 1970 4 '(-18000) -18000) => (0 7200) Looks like that's our bug. A workaround ought to be possible, but only by duplicating the broken functions. I don't have the time to do it. P.S. Lars, could you report this to the Emacs bug team? Ta. I guess you'd better include the associated documentation bug (what zone is the epoch?), too.