aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/lisp/my/my-utils.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-utils.el b/emacs/.emacs.d/lisp/my/my-utils.el
index db7e804..c64c9ac 100644
--- a/emacs/.emacs.d/lisp/my/my-utils.el
+++ b/emacs/.emacs.d/lisp/my/my-utils.el
@@ -45,6 +45,12 @@
(defun my-delete-http-header ()
(delete-region (point-min) (progn (my-skip-http-header) (point))))
+(defun my-time-from-epoch (t)
+ "Encode time from epoch T.
+
+Example: (format-time-string ... (my-time-from-epoch 1698582504))"
+ (encode-time (decode-time t)))
+
;; lists
(defun my-list-cycle (xs)
"Cycle a list."