diff options
| author | Paul Eggert | 2018-11-14 11:42:59 -0800 |
|---|---|---|
| committer | Paul Eggert | 2018-11-14 11:45:12 -0800 |
| commit | b1bb7917c15f880dc1c913a1e7c150396af873dc (patch) | |
| tree | ac5a49c54022e4e4746d9de9610069674c7a09f9 /lisp | |
| parent | 454f7923a7de9f65f55050dfab48eefc40d0ce29 (diff) | |
| download | emacs-b1bb7917c15f880dc1c913a1e7c150396af873dc.tar.gz emacs-b1bb7917c15f880dc1c913a1e7c150396af873dc.zip | |
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).
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/calendar/cal-dst.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el index 25264bda097..8392e81b16f 100644 --- a/lisp/calendar/cal-dst.el +++ b/lisp/calendar/cal-dst.el | |||
| @@ -154,7 +154,7 @@ Return nil if no such transition can be found." | |||
| 154 | (while | 154 | (while |
| 155 | ;; Set PROBE to halfway between LO and HI, rounding down. | 155 | ;; Set PROBE to halfway between LO and HI, rounding down. |
| 156 | ;; If PROBE equals LO, we are done. | 156 | ;; If PROBE equals LO, we are done. |
| 157 | (not (= lo (setq probe (/ (+ lo hi) 2)))) | 157 | (not (= lo (setq probe (floor (+ lo hi) 2)))) |
| 158 | ;; Set either LO or HI to PROBE, depending on probe results. | 158 | ;; Set either LO or HI to PROBE, depending on probe results. |
| 159 | (if (eq (car (current-time-zone probe)) hi-utc-diff) | 159 | (if (eq (car (current-time-zone probe)) hi-utc-diff) |
| 160 | (setq hi probe) | 160 | (setq hi probe) |