Gnus development mailing list
 help / color / mirror / Atom feed
From: Shenghuo ZHU <zsh@cs.rochester.edu>
Cc: Lars Magne Ingebrigtsen <bugs@gnus.org>
Subject: Bug: Y2K?!
Date: 10 Sep 1999 16:33:02 -0400	[thread overview]
Message-ID: <5bhfl28q2p.fsf@giga.cs.rochester.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]


(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  <zsh@cs.rochester.edu>

	* gnus-art.el (article-make-date-line): Fix time-zone bug.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 96-zsh6.diff --]
[-- Type: text/x-patch, Size: 975 bytes --]

--- ../../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)))))

                 reply	other threads:[~1999-09-10 20:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5bhfl28q2p.fsf@giga.cs.rochester.edu \
    --to=zsh@cs.rochester.edu \
    --cc=bugs@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).