Add util function to translate a unix timestamp
This commit is contained in:
parent
3654e83a40
commit
58da56006c
8
emacs/.emacs.d/config/init-utils.el
Normal file
8
emacs/.emacs.d/config/init-utils.el
Normal file
@ -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)
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user