From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/16874 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: date Date: 11 Sep 1998 14:50:31 +0900 Sender: owner-ding@hpc.uh.edu Message-ID: <28n287qjtk.fsf@kchisa.ga.sony.co.jp> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: multipart/mixed; boundary="Multipart_Fri_Sep_11_14:50:31_1998-1" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035155675 30418 80.91.224.250 (20 Oct 2002 23:14:35 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:14:35 +0000 (UTC) Return-Path: Original-Received: from gizmo.hpc.uh.edu (gizmo.hpc.uh.edu [129.7.102.31]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id BAA08216 for ; Fri, 11 Sep 1998 01:50:37 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (sina.hpc.uh.edu [129.7.3.5]) by gizmo.hpc.uh.edu (8.7.6/8.7.3) with ESMTP id AAF08295; Fri, 11 Sep 1998 00:21:38 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 11 Sep 1998 00:48:58 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [209.195.19.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id AAA14154 for ; Fri, 11 Sep 1998 00:48:38 -0500 (CDT) Original-Received: from gatekeeper7.sony.co.jp (firewall-user@gatekeeper7.Sony.CO.JP [202.238.80.21]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id BAA08186 for ; Fri, 11 Sep 1998 01:48:22 -0400 (EDT) Original-Received: by gatekeeper7.sony.co.jp (3.6W-07/30/98) with ESMTP id OAA22044 for ; Fri, 11 Sep 1998 14:48:12 +0900 (JST) Original-Received: from shigw.shi.sony.co.jp by sonygw1.sony.co.jp (3.7W98090317) with SMTP id OAA06567 for ; Fri, 11 Sep 1998 14:51:26 +0900 (JST) Original-Received: from gagw.ga.sony.co.jp (gabrg [43.1.185.224]) by shigw.shi.sony.co.jp (8.6.12+2.4W/3.4W-97092516) with SMTP id OAA16598 for ; Fri, 11 Sep 1998 14:47:56 +0900 Original-Received: from kchisa.ga.sony.co.jp by gagw.ga.sony.co.jp (4.2/6.4J.6) id AA15213; Fri, 11 Sep 98 14:47:35 JST Original-To: ding@gnus.org X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( Original-Lines: 70 User-Agent: Gnus/5.0700000000000003 (Pterodactyl Gnus v0.24) Emacs/19.34 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:16874 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:16874 --Multipart_Fri_Sep_11_14:50:31_1998-1 Content-Type: text/plain; charset=US-ASCII The last argument for encode-time() must be TZ. However, the last element of list from parse-time-string() is nil. I wonder the number of ellements from parse-time-string() exceeds right one by one. And one another thing. When we calculate UT in article-make-date-line(), only to input zero to TZ don't make the right value. This is the patch for it. --Multipart_Fri_Sep_11_14:50:31_1998-1 Content-Type: application/octet-stream; type=patch Content-Disposition: attachment; filename="pgnus-0.24-date.patch" Content-Transfer-Encoding: 7bit --- pgnus-0.24/lisp/gnus-art.el~ Thu Sep 10 11:01:51 1998 +++ pgnus-0.24/lisp/gnus-art.el Fri Sep 11 14:41:46 1998 @@ -1352,17 +1352,26 @@ ;; functions since they aren't particularly resistant to ;; buggy dates. ((eq type 'local) - (concat "Date: " (current-time-string time))) + (let ((tz (car (current-time-zone)))) + (format "Date: %s %s%04d" (current-time-string time) + (if (> tz 0) "+" "-") (abs (/ tz 36))))) ;; Convert to Universal Time. ((eq type 'ut) (concat "Date: " (current-time-string - (let ((e (parse-time-string date))) - (setcar (last e) 0) - (apply 'encode-time e))))) + (let* ((e (parse-time-string date)) + (tm (apply 'encode-time e)) + (ms (car tm)) + (ls (- (cadr tm) (car (current-time-zone))))) + (cond ((< ls 0) (list (1- ms) (+ ls 65536))) + ((> ls 65535) (list (1+ ms) (- ls 65536))) + (t (list ms ls))))) + " UT")) ;; Get the original date from the article. ((eq type 'original) - (concat "Date: " date)) + (concat "Date: " (if (string-match "\n+$" date) + (substring date 0 (match-beginning 0)) + date))) ;; Let the user define the format. ((eq type 'user) (if (gnus-functionp gnus-article-time-format) --- pgnus-0.24/lisp/parse-time.el~ Thu Sep 10 11:01:53 1998 +++ pgnus-0.24/lisp/parse-time.el Fri Sep 11 14:41:46 1998 @@ -169,7 +169,7 @@ "Parse the time-string STRING into (SEC MIN HOUR DAY MON YEAR DOW DST TZ). The values are identical to those of `decode-time', but any values that are unknown are returned as nil." - (let ((time (list nil nil nil nil nil nil nil nil nil nil)) + (let ((time (list nil nil nil nil nil nil nil nil nil)) (temp (parse-time-tokenize (downcase string)))) (while temp (let ((elt (pop temp)) --Multipart_Fri_Sep_11_14:50:31_1998-1 Content-Type: text/plain; charset=US-ASCII -- Katsumi Yamaoka --Multipart_Fri_Sep_11_14:50:31_1998-1--