1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-05 08:53:45 +00:00

Fix probing for pre-1970 DST

* lisp/calendar/cal-dst.el (calendar-next-time-zone-transition):
Fix recently-introduced rounding bug when probing for DST
transitions before 1970 (Bug#33380).
This commit is contained in:
Paul Eggert 2018-11-14 11:42:59 -08:00 committed by Paul Eggert
parent 454f7923a7
commit b1bb7917c1

View File

@ -154,7 +154,7 @@ Return nil if no such transition can be found."
(while
;; Set PROBE to halfway between LO and HI, rounding down.
;; If PROBE equals LO, we are done.
(not (= lo (setq probe (/ (+ lo hi) 2))))
(not (= lo (setq probe (floor (+ lo hi) 2))))
;; Set either LO or HI to PROBE, depending on probe results.
(if (eq (car (current-time-zone probe)) hi-utc-diff)
(setq hi probe)