aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2004-07-14 23:22:14 +0000
committerLuc Teirlinck2004-07-14 23:22:14 +0000
commitec9b5635fb83ae825ff15627043ff8fab16198b1 (patch)
tree12314ebb51542dd1db3dec2329eedc3c9deadebd
parent12cd6dfb8574eae2e92d73704b3101eb31f8468d (diff)
downloademacs-ec9b5635fb83ae825ff15627043ff8fab16198b1.tar.gz
emacs-ec9b5635fb83ae825ff15627043ff8fab16198b1.zip
(calendar-time-from-absolute): Return a list of two integers, instead
of a cons.
-rw-r--r--lisp/calendar/cal-dst.el4
1 files changed, 2 insertions, 2 deletions
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."
70(defun calendar-time-from-absolute (abs-date s) 70(defun calendar-time-from-absolute (abs-date s)
71 "Time of absolute date ABS-DATE, S seconds after midnight. 71 "Time of absolute date ABS-DATE, S seconds after midnight.
72 72
73Returns the pair (HIGH . LOW) where HIGH and LOW are the high and low 73Returns the list (HIGH LOW) where HIGH and LOW are the high and low
7416 bits, respectively, of the number of seconds 1970-01-01 00:00:00 UTC, 7416 bits, respectively, of the number of seconds 1970-01-01 00:00:00 UTC,
75ignoring leap seconds, that is the equivalent moment to S seconds after 75ignoring leap seconds, that is the equivalent moment to S seconds after
76midnight UTC on absolute date ABS-DATE." 76midnight UTC on absolute date ABS-DATE."
77 (let* ((a (- abs-date calendar-system-time-basis)) 77 (let* ((a (- abs-date calendar-system-time-basis))
78 (u (+ (* 163 (mod a 512)) (floor s 128)))) 78 (u (+ (* 163 (mod a 512)) (floor s 128))))
79 ;; Overflow is a terrible thing! 79 ;; Overflow is a terrible thing!
80 (cons 80 (list
81 ;; floor((60*60*24*a + s) / 2^16) 81 ;; floor((60*60*24*a + s) / 2^16)
82 (+ a (* 163 (floor a 512)) (floor u 512)) 82 (+ a (* 163 (floor a 512)) (floor u 512))
83 ;; (60*60*24*a + s) mod 2^16 83 ;; (60*60*24*a + s) mod 2^16