diff --git a/emacs/.emacs.d/config/init-utils.el b/emacs/.emacs.d/config/init-utils.el new file mode 100644 index 0000000..f22a453 --- /dev/null +++ b/emacs/.emacs.d/config/init-utils.el @@ -0,0 +1,8 @@ +;; -*- lexical-binding: t; -*- +(defun unix-time-to-string (epoch-seconds &optional format-string) + "Converts an epoch timestamp into a human-readable string." + (interactive "sUnix timestamp: ") + (let ((format-string (or format-string "%FT%T%z"))) + (format-time-string format-string epoch-seconds))) + +(provide 'init-utils) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index d3cc54a..ba7e542 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -71,6 +71,7 @@ (require 'init-org) (require 'init-profiler) (require 'init-built-ins) +(require 'init-utils) (require 'init-dashboard) (require 'init-dotfiles) (require 'init-buffers)