[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to set the default timezone for messages being sent?
From: |
Göktuğ Kayaalp |
Subject: |
Re: How to set the default timezone for messages being sent? |
Date: |
Mon, 08 Jan 2018 03:42:03 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
On 2018-01-05 23:52 +01, Bahodir Mansurov <bahodir@mansurov.org> wrote:
> Hello,
>
> Is there a way to set the timezone of newly composed messages from
> within Emacs (without changing the system timezone)? Specifically, I'm
> interested in changing the timezone of the "Date" header of the messages
> being sent.
You can change the TZ variable in Emacs like:
(setenv "TZ" "Europe/London")
it works for me. I guess you can make a function like this (example in
pseudo-code):
(setf default-timezone (getenv "TZ"))
(defun send-message-with-timezone (tz)
(interactive (list (read-string "Timezone: ")))
(setenv "TZ" tz)
(message-send)
(setenv "TZ" default-timezone))
and bind it to C-c C-c in message-mode.
> Thanks,
> B
>
--
İ. Göktuğ Kayaalp <http://www.gkayaalp.com/>
024C 30DD 597D 142B 49AC
40EB 465C D949 B101 2427