From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/25068 Path: main.gmane.org!not-for-mail From: Shenghuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Bug: Y2K?! Date: 10 Sep 1999 16:33:02 -0400 Organization: U of Rochester Sender: owner-ding@hpc.uh.edu Message-ID: <5bhfl28q2p.fsf@giga.cs.rochester.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035162523 12141 80.91.224.250 (21 Oct 2002 01:08:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:08:43 +0000 (UTC) Cc: Lars Magne Ingebrigtsen Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id QAA19131 for ; Fri, 10 Sep 1999 16:35:55 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id PAB15085; Fri, 10 Sep 1999 15:35:42 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 10 Sep 1999 15:35:37 -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 PAA23885 for ; Fri, 10 Sep 1999 15:35:26 -0500 (CDT) Original-Received: from cayuga.cs.rochester.edu (cayuga.cs.rochester.edu [192.5.53.209]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id QAA19033; Fri, 10 Sep 1999 16:33:07 -0400 (EDT) Original-Received: from slate.cs.rochester.edu (slate.cs.rochester.edu [192.5.53.101]) by cayuga.cs.rochester.edu (8.9.3/Q) with SMTP id QAA16085; Fri, 10 Sep 1999 16:33:04 -0400 (EDT) Original-Received: from giga.cs.rochester.edu (giga.cs.rochester.edu [192.5.53.186]) by slate.cs.rochester.edu (8.6.9/P) with ESMTP id QAA14574; Fri, 10 Sep 1999 16:33:03 -0400 Original-Received: (from zsh@localhost) by giga.cs.rochester.edu (SMI-8.6/P++) id QAA23546; Fri, 10 Sep 1999 16:33:02 -0400 Original-To: Gnus Mailing List X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q Original-Lines: 18 User-Agent: Gnus/5.070096 (Pterodactyl Gnus v0.96) Emacs/20.3 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:25068 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:25068 --=-=-= (article-make-date-line "Sat Jan 1 00:00:00 2000 -0400" 'local) => "Date: Fri Dec 31 23:00:00 1999 --400" (article-make-date-line "Sat Jan 1 00:00:00 2000 UT" 'ut) => "Date: Fri Dec 31 23:00:00 1999 UT" This only happens in daylight saving area. The attached patch fix the bug. Shenghuo 1999-09-10 Shenghuo ZHU * gnus-art.el (article-make-date-line): Fix time-zone bug. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=96-zsh6.diff --- ../../pgnus-sent/lisp/gnus-art.el Fri Sep 10 10:53:06 1999 +++ gnus-art.el Fri Sep 10 16:12:41 1999 @@ -1870,9 +1870,10 @@ ;; functions since they aren't particularly resistant to ;; buggy dates. ((eq type 'local) - (let ((tz (car (current-time-zone)))) + (let ((tz (car (current-time-zone time)))) (format "Date: %s %s%02d%02d" (current-time-string time) - (if (> tz 0) "+" "-") (/ tz 3600) (/ (% tz 3600) 60)))) + (if (> tz 0) "+" "-") (/ (abs tz) 3600) + (/ (% (abs tz) 3600) 60)))) ;; Convert to Universal Time. ((eq type 'ut) (concat "Date: " @@ -1880,7 +1881,7 @@ (let* ((e (parse-time-string date)) (tm (apply 'encode-time e)) (ms (car tm)) - (ls (- (cadr tm) (car (current-time-zone))))) + (ls (- (cadr tm) (car (current-time-zone time))))) (cond ((< ls 0) (list (1- ms) (+ ls 65536))) ((> ls 65535) (list (1+ ms) (- ls 65536))) (t (list ms ls))))) --=-=-=--