aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2022-09-13 17:12:12 +0200
committerRobin Jarry <robin@jarry.cc>2022-09-14 20:51:40 +0200
commit94bff9130d4e0a3b93563792f141444b5083fe51 (patch)
tree81bc92e4cb7816ad598d46363edbeaa723d59dfe /widgets
parent37c1db2ab22b892cc41c8d663a359fc6ebe12e31 (diff)
downloadaerc-94bff9130d4e0a3b93563792f141444b5083fe51.tar.gz
config: add option to hide timezone in sent emails
Some people are worried that they might leak their timezone and wish to send their mails with the Date header in UTC. For this a new key is added to the account sections to enforce sending in UTC instead of the system's timezone. Suggested-by: "Ricardo Correia" <aerc-lists.sr.ht@wizy.org> Thanks: to Ricardo for checking and correcting my incorrect assertions Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'widgets')
-rw-r--r--widgets/compose.go6
1 files changed, 5 insertions, 1 deletions
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
}