From 6cfa709a752b8168c8ef74ae33986a0daba4ff30 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Thu, 28 Jun 2018 21:38:23 +0200 Subject: [PATCH] Emacs mu4e: fix for timezone problem The timezone of the citation line was always GMT which could be confusing for some recipients. An comment on https://groups.google.com/forum/#!topic/mu-discuss/JlDSKsm9X5Y provided a fix for this problem. The switch from %H:%M:%S to %Z is purly code-cosmetic and doesn't change the output. The setting of the timezone with setenv is not part of the comment mentioned above. --- emacs/emacs.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/emacs/emacs.el b/emacs/emacs.el index 6aaa62f..22ae4d2 100644 --- a/emacs/emacs.el +++ b/emacs/emacs.el @@ -100,6 +100,9 @@ ;; https://www.reddit.com/r/emacs/comments/819v0h/how_to_speed_up_cursor_movement_by_10x/ auto-window-vscroll nil) +;; set timezone +(setenv "TZ" "/etc/localtime") + ;; disable cursor blinking (blink-cursor-mode -1) @@ -925,8 +928,11 @@ (mu4e)) ;; set citation line - (setq message-citation-line-format "%f @ %Y-%m-%d %H:%M:%S %Z:\n") - (setq message-citation-line-function 'message-insert-formatted-citation-line) + (setq message-citation-line-format "%f @ %Y-%m-%d %T %Z:\n") + (setq message-citation-line-function + (lambda () + (message-insert-formatted-citation-line + nil nil (car (current-time-zone))))) ;; macro for creating university mu4e contexts (defmacro mu4e-add-university-context (context-name match-func mail-address full-name signature-file)