Use dot-time format for modeline timestamp
My current understanding of how computers deal with time: - Modelling time is easy: use the number of seconds that have elapsed since the Unix epoch. - Display time is complicated. Which timezone should we use? Which format string?
This commit is contained in:
parent
675b8084c7
commit
b1e358f247
1 changed files with 12 additions and 4 deletions
|
@ -6,10 +6,18 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; Display time in the modeline
|
;; I'm borrowing from the dot-time format (i.e. https://dotti.me) to encode the
|
||||||
;; TODO: Save preferred date format strings and cycle through them since I waver
|
;; timestamp. This displays the UTC time and an offset to show the number of
|
||||||
;; about which is my favorite.
|
;; hours East or West of UTC my current timezone is using `current-time-zone'.
|
||||||
(setq display-time-format "%R %a %d %b [%U of 52 weeks]")
|
;;
|
||||||
|
;; Reminder to me:
|
||||||
|
;; LON: +00 (UTC) or +01 (BST)
|
||||||
|
;; NYC: -05
|
||||||
|
;; SF: -07
|
||||||
|
(setq display-time-format
|
||||||
|
(concat "%H·%M"
|
||||||
|
(format "%0+3d" (/ (car (current-time-zone)) 3600))
|
||||||
|
" %a %d %b [%U of 52 weeks]"))
|
||||||
(display-time-mode 1)
|
(display-time-mode 1)
|
||||||
|
|
||||||
;; disable custom variable entries from being written to ~/.emacs.d/init.el
|
;; disable custom variable entries from being written to ~/.emacs.d/init.el
|
||||||
|
|
Loading…
Reference in a new issue