aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--config/config.go1
-rw-r--r--doc/aerc-config.5.scd5
-rw-r--r--widgets/compose.go6
4 files changed, 12 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 145a65df..7997db03 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Support for bindings with the Alt modifier.
- Zoxide support with `:z`.
+- Hide local timezone with `send-as-utc = true` in `accounts.conf`.
### Changed
diff --git a/config/config.go b/config/config.go
index e7e4de03..61ee3b3f 100644
--- a/config/config.go
+++ b/config/config.go
@@ -163,6 +163,7 @@ type AccountConfig struct {
EnableFoldersSort bool `ini:"enable-folders-sort"`
FoldersSort []string `ini:"folders-sort" delim:","`
AddressBookCmd string `ini:"address-book-cmd"`
+ SendAsUTC bool `ini:"send-as-utc"`
// CheckMail
CheckMail time.Duration `ini:"check-mail"`
diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd
index ac280563..943c6c80 100644
--- a/doc/aerc-config.5.scd
+++ b/doc/aerc-config.5.scd
@@ -686,6 +686,11 @@ Note that many of these configuration options are written for you, such as
Default: Drafts
+*send-as-utc*
+ Converts the timestamp of the Date header to UTC.
+
+ Default: false
+
*source*
Specifies the source for reading incoming emails on this account. This key
is required for all accounts. It should be a connection string, and the
diff --git a/widgets/compose.go b/widgets/compose.go
index 5106e17d..db83a608 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -584,7 +584,11 @@ func (c *Composer) PrepareHeader() (*mail.Header, error) {
}
}
if !c.header.Has("Date") {
- c.header.SetDate(time.Now())
+ if c.acctConfig.SendAsUTC {
+ c.header.SetDate(time.Now().UTC())
+ } else {
+ c.header.SetDate(time.Now())
+ }
}
return c.header, nil
}