From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/11230 Path: main.gmane.org!not-for-mail From: "Darren/Torin/Who Ever..." Newsgroups: gmane.emacs.gnus.general Subject: bug in gnus-encode-date (in gnus-util.el) with patch Date: 31 May 1997 01:01:00 -0700 Organization: Discordian Alliance For Teaching Message-ID: <87206o5aun.fsf@perv.daft.com> NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035150974 29082 80.91.224.250 (20 Oct 2002 21:56:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:56:14 +0000 (UTC) Return-Path: Original-Received: from sandy.calag.com (root@sandy [206.190.83.128]) by altair.xemacs.org (8.8.5/8.8.5) with ESMTP id BAA32453 for ; Sat, 31 May 1997 01:52:43 -0700 Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by sandy.calag.com (8.8.5/8.8.5) with ESMTP id BAA14966 for ; Sat, 31 May 1997 01:52:40 -0700 Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by xemacs.org (8.8.5/8.8.5) with SMTP id DAA14110 for ; Sat, 31 May 1997 03:52:00 -0500 (CDT) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by ifi.uio.no with SMTP (8.6.11/ifi2.4) id for ; Sat, 31 May 1997 10:01:31 +0200 Original-Received: (qmail 12626 invoked by uid 504); 31 May 1997 08:01:29 -0000 Original-Received: (qmail 12623 invoked from network); 31 May 1997 08:01:28 -0000 Original-Received: from perv.daft.com (204.122.30.2) by claymore.vcinet.com with SMTP; 31 May 1997 08:01:28 -0000 Original-Received: (from torin@localhost) by perv.daft.com (8.7.6/8.6.12) id BAA30502; Sat, 31 May 1997 01:01:01 -0700 Original-To: ding@gnus.org X-Web: http://www.daft.com/~torin/ X-Discordia: Hail Eris - keep up OM X-Address: 2608 Second Avenue, #282 Seattle, WA 98121-1212 USA X-Phone-Fax: +1-800-921-4996/+1-206-727-5084 X-Face: @E5e"O[(T!v&8{hyJLrPQnww-"r;+642m"aAJi~H2t#QCQj)UkGNh4FL,;\sc{e[]|MXbF| *A+F|~XOY2JP'Bvk_.Gd{W0$/y5i<"X0y4%0S5GA6S\&/$P@Dgcr~cT1p6,op6N}#{A\0>9CaWy]a) ].L1j39flY?{z;KeP X-Mailer: Gnus v5.4.55/XEmacs 19.15 Original-Lines: 47 Original-Xref: altair.xemacs.org dgnus-list:1620 Xref: main.gmane.org gmane.emacs.gnus.general:11230 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:11230 -----BEGIN PGP SIGNED MESSAGE----- gnus-encode-date is a handy little function that will turn a mail header date into an Emacs date. Useful for user-format functions. Unfortunately, it has a bug. It calls timezone-parse-date for the meaty work returning an array of time elements which are then passed to encode-time in the appropriate order. The problem occurs since timezone-parse-date just returns whatever timezone data was in the message and encode-time expects the timezone data to be in seconds off of GMT. The following (simple) patch fixes this. It's indented two spaces to foil patch mangling by pgp. (patch will still like it.) --- gnus-5.4.55.old/lisp/gnus-util.el Sat May 17 22:37:16 1997 +++ gnus-5.4.55/lisp/gnus-util.el Thu May 29 19:14:59 1997 @@ -255,7 +255,7 @@ (date (mapcar (lambda (d) (and d (string-to-int d))) parse)) (time (mapcar 'string-to-int (timezone-parse-time (aref parse 3))))) (encode-time (caddr time) (cadr time) (car time) - (caddr date) (cadr date) (car date) (nth 4 date)))) + (caddr date) (cadr date) (car date) (* 60 (timezone-zone-to-minute (nth 4 date)))))) (defun gnus-time-minus (t1 t2) "Subtract two internal times." Darren - -- Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996 @ Do you have your clothes on? I probably don't. Take yours off. Feel better. @ @ Sysadmin, webweaver, postmaster for hire. C/Perl/CGI programmer and tutor. @ -----BEGIN PGP SIGNATURE----- Version: 2.6.3 Charset: noconv Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface iQCVAwUBM4/ayI4wrq++1Ls5AQFtkAP+K+6wnAJx60vxdHiOxrP/pmNJafG1FLqh QiVNbe8N93T1aj1Zw9/mpT2m35ehr1Fno0hF4qTuLW/92qHyY0kCO9ooCz1ai+ud qCBePxZdR3qli2u5zKMjeLc0zINd4ja390QYCO6TodCxSGsBEcUqb+Np2fMzRq03 xqsKU9Oqg40= =riTU -----END PGP SIGNATURE-----