From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/24256 Path: main.gmane.org!not-for-mail From: Toby Speight Newsgroups: gmane.emacs.gnus.general Subject: Re: Time zone and 'lapsed under NT Date: 15 Jul 1999 11:55:42 +0000 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 1035161854 7742 80.91.224.250 (21 Oct 2002 00:57:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:57:34 +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 HAA23797 for ; Thu, 15 Jul 1999 07:01:01 -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 GAB11546; Thu, 15 Jul 1999 06:00:45 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 15 Jul 1999 06:01:22 -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 GAA27814 for ; Thu, 15 Jul 1999 06:01:01 -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 GAA23784 for ; Thu, 15 Jul 1999 06:59:52 -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 AAA370 for ; Thu, 15 Jul 1999 12:00:23 +0100 Original-To: ding@gnus.org Original-Lines: 56 In-Reply-To: Toby Speight's message of "Mon, 12 Jul 1999 18:46:13 GMT" X-Author-Info: Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:24256 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:24256 Toby> Toby Speight Toby> 0> In , Toby wrote: Toby> (encode-time 0 0 2 1 1 1970 4 '(0) 0) Toby> => (0 7200) Toby> (encode-time 0 0 2 1 1 1970 4 '(-18000) -18000) Toby> => (0 7200) Toby> Toby> Looks like that's our bug. A workaround ought to be possible, Toby> ... Here's a workaround: in time-date.el, replace date-to-time with (defun date-to-time (date) "Convert DATE into time." (condition-case () (let ((time (parse-time-string date))) (setq time (cons (- (car time) (- (or (nth 8 time) 0) (or (car (current-time-zone)) 0))) (cdr time))) (setcdr (cdr (cdr (cdr (cdr (cdr time))))) nil) (apply 'encode-time time)) (error (error "Invalid date: %s" date)))) This could do with some testing in other time zones and a regression test on non-NT platforms, though. And you need to change article-make-date-line not to use parse-time-string directly: ((eq type 'ut) (concat "Date: " (current-time-string (let* ((e (parse-time-string date)) (tm (apply 'encode-time e)) (ms (car tm)) (ls (- (cadr tm) (car (current-time-zone))))) becomes ((eq type 'ut) (concat "Date: " (current-time-string (let* ((ms (car time)) (ls (- (cadr time) (car (current-time-zone))))) Alternatively, you could make parse-time-string do the stuff I put into date-to-time.