# HG changeset patch # User Andrew Innes # Date 925638045 0 # Node ID 809c3c8f6b773e0ad3b806115520f3d3180565d5 # Parent 991a19a97565cbc1cd19f7096c5e037833f8d1f1 (ls-lisp-format-time): Trap errors from format-time-string, and return a suitable string to indicate the timestamp was invalid. diff -r 991a19a97565 -r 809c3c8f6b77 lisp/ls-lisp.el --- a/lisp/ls-lisp.el Sun May 02 09:38:50 1999 +0000 +++ b/lisp/ls-lisp.el Sun May 02 09:40:45 1999 +0000 @@ -302,15 +302,17 @@ (diff (+ (ash diff16 16) (- (car (cdr time)) (car (cdr now))))) (past-cutoff (- (* 6 30 24 60 60))) ; 6 30-day months (future-cutoff (* 60 60))) ; 1 hour - (format-time-string - (if (and - (<= past-cutoff diff) (<= diff future-cutoff) - ;; Sanity check in case `diff' computation overflowed. - (<= (1- (ash past-cutoff -16)) diff16) - (<= diff16 (1+ (ash future-cutoff -16)))) - "%b %e %H:%M" - "%b %e %Y") - time))) + (condition-case nil + (format-time-string + (if (and + (<= past-cutoff diff) (<= diff future-cutoff) + ;; Sanity check in case `diff' computation overflowed. + (<= (1- (ash past-cutoff -16)) diff16) + (<= diff16 (1+ (ash future-cutoff -16)))) + "%b %e %H:%M" + "%b %e %Y") + time) + (error "??? ?? ????")))) (provide 'ls-lisp)