diff options
author | Roland McGrath <roland@gnu.org> | 1993-08-10 17:57:31 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1993-08-10 17:57:31 +0000 |
commit | 4cc1b78aef30ea5b3cb4f5b573794e8a0e36d901 (patch) | |
tree | 659a413fec1cb03361ff5b88129387aff4e96402 /lisp/calendar/cal-dst.el | |
parent | 8bab5c187a97b19ec90899dca79970715944e490 (diff) | |
download | emacs-4cc1b78aef30ea5b3cb4f5b573794e8a0e36d901.tar.gz |
Undo last change.
Diffstat (limited to 'lisp/calendar/cal-dst.el')
-rw-r--r-- | lisp/calendar/cal-dst.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el index 4726ba1fd23..62ca6b089a1 100644 --- a/lisp/calendar/cal-dst.el +++ b/lisp/calendar/cal-dst.el @@ -58,13 +58,13 @@ absolute date ABS-DATE is the equivalent moment to X." (let* ((h (car x)) (xtail (cdr x)) (l (+ utc-diff (if (numberp xtail) xtail (car xtail)))) - (u (+ (* 512 (% h 675)) (floor (/ l 128))))) + (u (+ (* 512 (mod h 675)) (floor l 128)))) ;; Overflow is a terrible thing! (cons (+ calendar-system-time-basis ;; floor((2^16 h +l) / (60*60*24)) - (* 512 (% h 675)) (floor (/ u 675))) + (* 512 (mod h 675)) (floor u 675)) ;; (2^16 h +l) % (60*60*24) - (+ (* (% u 675) 128) (floor (% l 128)))))) + (+ (* (mod u 675) 128) (floor l 128))))) (defun calendar-time-from-absolute (abs-date s) "Time of absolute date ABS-DATE, S seconds after midnight. @@ -74,13 +74,13 @@ Returns the pair (HIGH . LOW) where HIGH and LOW are the high and low ignoring leap seconds, that is the equivalent moment to S seconds after midnight UTC on absolute date ABS-DATE." (let* ((a (- abs-date calendar-system-time-basis)) - (u (+ (* 163 (% a 512)) (floor (/ s 128))))) + (u (+ (* 163 (mod a 512)) (floor s 128)))) ;; Overflow is a terrible thing! (cons ;; (60*60*24*a + s) / 2^16 - (+ a (* 163 (floor (/ a 512))) (floor (/ u 512))) + (+ a (* 163 (floor a 512)) (floor u 512)) ;; (60*60*24*a + s) % 2^16 - (+ (* 128 (% u 512)) (% s 128))))) + (+ (* 128 (mod u 512)) (mod s 128))))) (defun calendar-next-time-zone-transition (time) "Return the time of the next time zone transition after TIME. |