aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2018-10-22 10:54:45 -0700
committerPaul Eggert2018-10-22 11:00:15 -0700
commit8602bd855904acc1966f1a94a008f91bb3f88c18 (patch)
treeef37bec05c54d86a0a06651db772d859a9517227
parent7d5919e5e73c62735297eb118b913029594bd0ef (diff)
downloademacs-8602bd855904acc1966f1a94a008f91bb3f88c18.tar.gz
emacs-8602bd855904acc1966f1a94a008f91bb3f88c18.zip
Fix epg bug with (TICKS . HZ) timestamp
Problem reported by Joseph Mingrone in: https://lists.gnu.org/r/emacs-devel/2018-10/msg00380.html * lisp/epg.el (epg--time-from-seconds): Just use a seconds count; don’t generate an obsolete-format timestamp.
-rw-r--r--lisp/epg.el5
1 files changed, 1 insertions, 4 deletions
diff --git a/lisp/epg.el b/lisp/epg.el
index 8f26cd34ee4..9d9bc9051da 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -946,10 +946,7 @@ callback data (if any)."
946 (cons (cons 'no-seckey string) 946 (cons (cons 'no-seckey string)
947 (epg-context-result-for context 'error)))) 947 (epg-context-result-for context 'error))))
948 948
949(defun epg--time-from-seconds (seconds) 949(defalias 'epg--time-from-seconds #'string-to-number)
950 (let ((number-seconds (string-to-number (concat seconds ".0"))))
951 (cons (floor (/ number-seconds 65536))
952 (floor (mod number-seconds 65536)))))
953 950
954(defun epg--status-ERRSIG (context string) 951(defun epg--status-ERRSIG (context string)
955 (if (string-match "\\`\\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) \ 952 (if (string-match "\\`\\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) \