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.
This commit is contained in:
parent
913808e224
commit
bd49b6f1b3
1 changed files with 11 additions and 1 deletions
|
@ -478,7 +478,17 @@ to add an effort property.")
|
||||||
(funcall dichotomy
|
(funcall dichotomy
|
||||||
most-negative-fixnum
|
most-negative-fixnum
|
||||||
0
|
0
|
||||||
(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)
|
||||||
|
(string-match-p
|
||||||
|
"10\\.6\\.[[:digit:]]"
|
||||||
|
(shell-command-to-string
|
||||||
|
"sw_vers -productVersion"))
|
||||||
|
(<= m -1034058203136))
|
||||||
|
(ignore-errors (decode-time (list m 0)))))))
|
||||||
(low
|
(low
|
||||||
(funcall dichotomy
|
(funcall dichotomy
|
||||||
most-negative-fixnum
|
most-negative-fixnum
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue