From: Toby Speight <Toby.Speight@streapadair.freeserve.co.uk>
Subject: Re: Time zone and 'lapsed under NT
Date: 15 Jul 1999 11:55:42 +0000 [thread overview]
Message-ID: <u7lo2xh35.fsf@lanber.cam.citrix.com> (raw)
In-Reply-To: Toby Speight's message of "Mon, 12 Jul 1999 18:46:13 GMT"
Toby> Toby Speight
Toby> <URL:mailto:Toby.Speight@streapadair.freeserve.co.uk>
0> In <URL:news:uu2r9yasp.fsf@lanber.cam.citrix.com>, 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.
next prev parent reply other threads:[~1999-07-15 11:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-09 15:23 Lars Magne Ingebrigtsen
1999-07-09 16:31 ` Toby Speight
1999-07-09 21:01 ` Lars Magne Ingebrigtsen
1999-07-12 18:37 ` Toby Speight
1999-07-15 11:55 ` Toby Speight [this message]
1999-08-27 17:57 ` Lars Magne Ingebrigtsen
1999-08-27 17:55 ` Lars Magne Ingebrigtsen
1999-07-12 18:44 ` Toby Speight
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=u7lo2xh35.fsf@lanber.cam.citrix.com \
--to=toby.speight@streapadair.freeserve.co.uk \
/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).