]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix probing for pre-1970 DST
authorPaul Eggert <eggert@Penguin.CS.UCLA.EDU>
Wed, 14 Nov 2018 19:42:59 +0000 (11:42 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 14 Nov 2018 19:45:12 +0000 (11:45 -0800)
* lisp/calendar/cal-dst.el (calendar-next-time-zone-transition):
Fix recently-introduced rounding bug when probing for DST
transitions before 1970 (Bug#33380).

lisp/calendar/cal-dst.el

index 25264bda097d566faf86bdfeaf089a9fe0c3c66b..8392e81b16fbc72b16d95725aa4a0fbf35039b97 100644 (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)