From: Luc Teirlinck Date: Wed, 14 Jul 2004 23:22:14 +0000 (+0000) Subject: (calendar-time-from-absolute): Return a list of two integers, instead X-Git-Tag: ttn-vms-21-2-B4~5484 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec9b5635fb83ae825ff15627043ff8fab16198b1;p=emacs.git (calendar-time-from-absolute): Return a list of two integers, instead of a cons. --- diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el index 68943b77b28..034e8e28523 100644 --- a/lisp/calendar/cal-dst.el +++ b/lisp/calendar/cal-dst.el @@ -70,14 +70,14 @@ absolute date ABS-DATE is the equivalent moment to X." (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