diff --git a/CHANGELOG.md b/CHANGELOG.md index 145a65d..7997db0 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 e7e4de0..61ee3b3 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 ac28056..943c6c8 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 5106e17..db83a60 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 }