Skip to content
This repository has been archived by the owner on Apr 18, 2022. It is now read-only.

Commit

Permalink
Fix epg bug with (TICKS . HZ) timestamp
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eggert committed Oct 22, 2018
1 parent 7d5919e commit 8602bd8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lisp/epg.el
Original file line number Diff line number Diff line change
Expand Up @@ -946,10 +946,7 @@ callback data (if any)."
(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]+\\) \
Expand Down

0 comments on commit 8602bd8

Please sign in to comment.