bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-20.7, emacs-21.0.103] wrong solstice date


From: Karl Heuer
Subject: [emacs-20.7, emacs-21.0.103] wrong solstice date
Date: Thu, 21 Jun 2001 19:01:45 -0400

(Observed in emacs-20.7; not tested in Emacs 21, but it's
almost certainly still there.)

$ TZ=PST8PDT emacs -q
M-x calendar RET
a

The generate text includes the line:
Wednesday, June 20, 2001: Summer Solstice 12:37am (PDT)

But the solstice is actually on June 21 at that same time, as can
be verified by running the same commands in any other timezone.

The problem is that the DST adjustment changes not only the hour
of the solstice, but also (in this case) the day; but the code
after the call to dst-adjust-time is ignoring the adjusted day
in favor of the originally computed day.

This patch fixes it.

*** lisp/calendar/solar.el~     Tue Dec 16 11:12:36 1997
--- lisp/calendar/solar.el      Thu Jun 21 15:41:36 2001
***************
*** 1044,1050 ****
             (h0 (* 24 (- (car (cdr d0)) (floor (car (cdr d0))))))
             (adj (dst-adjust-time d1 h0))
!            (d (list (car d1) (+ (car (cdr d1))  
                    (/ (car (cdr adj)) 24.0))
!                     (car (cdr (cdr d1)))))
             ; The following is nearly as accurate, but not quite:
           ;(d0 (solar-date-next-longitude
--- 1044,1050 ----
             (h0 (* 24 (- (car (cdr d0)) (floor (car (cdr d0))))))
             (adj (dst-adjust-time d1 h0))
!            (d (list (car (car adj)) (+ (car (cdr (car adj)))  
                    (/ (car (cdr adj)) 24.0))
!                     (car (cdr (cdr (car adj))))))
             ; The following is nearly as accurate, but not quite:
           ;(d0 (solar-date-next-longitude



reply via email to

[Prev in Thread] Current Thread [Next in Thread]