]> git.eshelyaron.com Git - emacs.git/commitdiff
Simplify epa-ks--parse-buffer timestamp handling
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2021 17:40:22 +0000 (09:40 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2021 19:17:27 +0000 (11:17 -0800)
* lisp/epa-ks.el (epa-ks--parse-buffer): Omit unnecessary calls to
seconds-to-time, and prefer the unaliased name time-convert when
calls are necessary.

lisp/epa-ks.el

index 5dd6ad34d741e62590715476d42f629ace52f4dc..186b0ac9d1c769b8f78a1f903f21532d32098242 100644 (file)
@@ -295,12 +295,12 @@ enough, since keyservers have strict timeout settings."
                :created
                (and  (match-string 4)
                      (not (string-empty-p (match-string 4)))
-                     (seconds-to-time
+                    (time-convert
                       (string-to-number (match-string 4))))
                :expires
                (and (match-string 5)
                     (not (string-empty-p (match-string 5)))
-                    (seconds-to-time
+                   (time-convert
                      (string-to-number (match-string 5))))
                :flags
                (mapcar (lambda (flag)
@@ -319,15 +319,11 @@ enough, since keyservers have strict timeout settings."
                :created
                (and (match-string 2)
                     (not (string-empty-p (match-string 2)))
-                    (decode-time (seconds-to-time
-                                  (string-to-number
-                                   (match-string 2)))))
+                   (decode-time (string-to-number (match-string 2))))
                :expires
                (and (match-string 3)
                     (not (string-empty-p (match-string 3)))
-                    (decode-time (seconds-to-time
-                                  (string-to-number
-                                   (match-string 3)))))
+                   (decode-time (string-to-number (match-string 3))))
                :flags
                (mapcar (lambda (flag)
                          (cdr (assq flag '((?r revoked)