Commit bd49b6f1 authored by Charles A. Roelli's avatar Charles A. Roelli

Workaround for faulty localtime() under macOS 10.6

* lisp/org/org-clock.el (org-clock--oldest-date): Only execute
'decode-time' on times later than year -2**31 under macOS 10.6.
See Bug#27706.
parent 913808e2
......@@ -478,7 +478,17 @@ to add an effort property.")
(funcall dichotomy
(lambda (m) (ignore-errors (decode-time (list m 0))))))
(lambda (m)
;; libc in macOS 10.6 hangs when decoding times
;; around year -2**31. Limit `high' not to go
;; any earlier than that.
(unless (and (eq system-type 'darwin)
"sw_vers -productVersion"))
(<= m -1034058203136))
(ignore-errors (decode-time (list m 0)))))))
(funcall dichotomy
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment