Debug dottime in modeline
My modeline was displaying the local time (not UTC time) and appending the UTC timezone offset, which was confusing me. When it was `00:03` in London, my modeline would read `00:03+01`. One way of interpreting this is that it's `00:03` in London and the `+01` is a reminder that I'm one hour ahead of UTC. However, I was reading it as though it was `00:03` UTC and thus `01:03` in London. I had to set `display-time-string-forms` instead of `display-time-string` to pass the `t` argument to the `ZONE` parameter to indicate that I'd prefer to use UTC time and not local time when expanding the variables.
This commit is contained in:
parent
1ad6c30acc
commit
34ec3104f7
1 changed files with 5 additions and 4 deletions
|
@ -33,10 +33,11 @@
|
||||||
;; LON: +00 (UTC) or +01 (BST)
|
;; LON: +00 (UTC) or +01 (BST)
|
||||||
;; NYC: -05
|
;; NYC: -05
|
||||||
;; SF: -07
|
;; SF: -07
|
||||||
(setq display-time-format
|
(setq display-time-string-forms
|
||||||
|
'((format-time-string
|
||||||
(concat "%H·%M"
|
(concat "%H·%M"
|
||||||
(format "%0+3d" (/ (car (current-time-zone)) 3600))
|
(format "%0+3d" (/ (car (current-time-zone)) 3600))
|
||||||
" %a %d %b"))
|
" %a %d %b") nil t)))
|
||||||
(display-time-mode 1)
|
(display-time-mode 1)
|
||||||
|
|
||||||
;; Remove the boilerplate in the *scratch* buffer
|
;; Remove the boilerplate in the *scratch* buffer
|
||||||
|
|
Loading…
Reference in a new issue