Fix handling of dates before Unix epoch in NTP conversion
This commit is contained in:
parent
d6690d27f9
commit
f44ed54318
|
@ -210,6 +210,9 @@ If not given, FORMAT-STRING defaults to some ISO 8601-like format."
|
|||
(let* ((high-seconds (- high 2208992400)) ; subtract seconds between 1900-01-01 and the epoch
|
||||
(h (lsh high-seconds -16))
|
||||
(let* ((high-seconds (- high 2208988800)) ; subtract seconds between 1900-01-01 and the epoch
|
||||
(h (if (< high-seconds 0)
|
||||
(- (lsh (- high-seconds) -16))
|
||||
(lsh high-seconds -16)))
|
||||
(l (% high-seconds 65536))
|
||||
(u (floor (* (/ low 4294967296.0) 1e6)))
|
||||
(p (- low (floor (/ (* u 4294967296) 1e6)))))
|
||||
|
|
Loading…
Reference in New Issue