Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
3ac14ca0
Commit
3ac14ca0
authored
Nov 13, 1993
by
Richard M. Stallman
Browse files
(calendar-absolute-from-time): Undo Sep 14 patch.
Fix comments instead, since they didn't match the code.
parent
ff383ac0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lisp/calendar/cal-dst.el
lisp/calendar/cal-dst.el
+4
-4
No files found.
lisp/calendar/cal-dst.el
View file @
3ac14ca0
...
...
@@ -63,8 +63,8 @@ absolute date ABS-DATE is the equivalent moment to X."
(
cons
(
+
calendar-system-time-basis
;; floor((2^16 h +l) / (60*60*24))
(
*
512
(
floor
h
675
))
(
floor
u
675
))
;; (2^16 h +l)
%
(60*60*24)
(
+
(
*
(
%
u
675
)
128
)
(
%
l
128
)))))
;; (2^16 h +l)
mod
(60*60*24)
(
+
(
*
(
mod
u
675
)
128
)
(
mod
l
128
)))))
(
defun
calendar-time-from-absolute
(
abs-date
s
)
"Time of absolute date ABS-DATE, S seconds after midnight.
...
...
@@ -77,9 +77,9 @@ midnight UTC on absolute date ABS-DATE."
(
u
(
+
(
*
163
(
mod
a
512
))
(
floor
s
128
))))
;; Overflow is a terrible thing!
(
cons
;; (60*60*24*a + s) / 2^16
;;
floor(
(60*60*24*a + s) / 2^16
)
(
+
a
(
*
163
(
floor
a
512
))
(
floor
u
512
))
;; (60*60*24*a + s)
%
2^16
;; (60*60*24*a + s)
mod
2^16
(
+
(
*
128
(
mod
u
512
))
(
mod
s
128
)))))
(
defun
calendar-next-time-zone-transition
(
time
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment