# HG changeset patch # User Luc Teirlinck # Date 1089847334 0 # Node ID 5572efece9a641a895f66ced8018d96068dcdd79 # Parent 27e781b700535182e277023768a13786526a9983 (calendar-time-from-absolute): Return a list of two integers, instead of a cons. diff -r 27e781b70053 -r 5572efece9a6 lisp/calendar/cal-dst.el --- a/lisp/calendar/cal-dst.el Wed Jul 14 23:04:14 2004 +0000 +++ b/lisp/calendar/cal-dst.el Wed Jul 14 23:22:14 2004 +0000 @@ -70,14 +70,14 @@ (defun calendar-time-from-absolute (abs-date s) "Time of absolute date ABS-DATE, S seconds after midnight. -Returns the pair (HIGH . LOW) where HIGH and LOW are the high and low +Returns the list (HIGH LOW) where HIGH and LOW are the high and low 16 bits, respectively, of the number of seconds 1970-01-01 00:00:00 UTC, 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 (mod a 512)) (floor s 128)))) ;; Overflow is a terrible thing! - (cons + (list ;; floor((60*60*24*a + s) / 2^16) (+ a (* 163 (floor a 512)) (floor u 512)) ;; (60*60*24*a + s) mod 2^16