+2006-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * epa.el (epa--format-seconds): New function.
+ (epa-show-key): Convert seconds from epoch to date.
+
2006-05-28 Daiki Ueno <ueno@unixuser.org>
* epg.el (epg-start-import-keys): Don't specify filename if keys
(delete-window (get-buffer-window epa-keys-buffer)))
(kill-buffer epa-keys-buffer))))
+(defun epa--format-seconds (seconds)
+ (let ((number-seconds (string-to-number (concat seconds ".0"))))
+ (format-time-string "%Y-%m-%d"
+ (cons (floor (/ number-seconds 65536))
+ (floor (mod number-seconds 65536))))))
+
(defun epa-show-key (key)
(let* ((primary-sub-key (car (epg-key-sub-key-list key)))
(entry (assoc (epg-sub-key-id primary-sub-key)
(cdr (assq (epg-sub-key-algorithm (car pointer))
epg-pubkey-algorithm-alist))
"\n\tCreated: "
- (epg-sub-key-creation-time (car pointer))
+ (epa--format-seconds (epg-sub-key-creation-time (car pointer)))
(if (epg-sub-key-expiration-time (car pointer))
- (format "\n\tExpires: %s" (epg-sub-key-expiration-time
- (car pointer)))
+ (format "\n\tExpires: %s"
+ (epa--format-seconds (epg-sub-key-expiration-time
+ (car pointer))))
"")
"\n\tCapabilities: "
(mapconcat #'symbol-name