From 5bb8d5aa20febabbfb5fa20ea124eed632d447e4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 22 Oct 2018 10:54:45 -0700 Subject: [PATCH] Fix epg bug with (TICKS . HZ) timestamp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- lisp/epg.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lisp/epg.el b/lisp/epg.el index 8f26cd34ee..9d9bc9051d 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -946,10 +946,7 @@ epg--status-NO_SECKEY (cons (cons 'no-seckey string) (epg-context-result-for context 'error)))) -(defun epg--time-from-seconds (seconds) - (let ((number-seconds (string-to-number (concat seconds ".0")))) - (cons (floor (/ number-seconds 65536)) - (floor (mod number-seconds 65536))))) +(defalias 'epg--time-from-seconds #'string-to-number) (defun epg--status-ERRSIG (context string) (if (string-match "\\`\\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) \ -- 2.17.2