Simplify epa-ks--display-keys time calc

* lisp/epa-ks.el (epa-ks--display-keys):
Simplify by using time-less-p.  This also avoids a rounding error.
This commit is contained in:
Paul Eggert 2026-06-05 18:59:25 -07:00
parent 2dc98b69e0
commit 56b93016fc

View file

@ -194,7 +194,7 @@ KEYS is a list of `epa-ks-key' structures, as parsed by
(if (epa-ks-key-expires key)
(let* ((date (epa-ks-key-expires key))
(str (format-time-string "%F" date)))
(when (< 0 (time-to-seconds (time-since date)))
(when (time-less-p date nil)
(setq str (propertize str 'face
'font-lock-warning-face)))
str)