about summary refs log tree commit diff stats
path: root/commands/msg
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-06-26 09:25:53 +0200
committerReto Brunner <reto@labrat.space>2020-06-26 09:25:53 +0200
commit8f1c6c46ff1de2d94377c0cf20fdc8bbdba59fef (patch)
tree5ebbdb98a2f28419c6cdaf193c5dc76ebaea5c45 /commands/msg
parent91db250272502f9d1f1f388fa59f5782fd103815 (diff)
downloadaerc-8f1c6c46ff1de2d94377c0cf20fdc8bbdba59fef.tar.gz
Fix dates in reply/forward commands.
The data was passed around as a string for some reason, which led to time
precision loss and wrong dates being displayed.
Simply pass the time as is to fix that.
Diffstat (limited to 'commands/msg')
-rw-r--r--commands/msg/forward.go2
-rw-r--r--commands/msg/reply.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/commands/msg/forward.go b/commands/msg/forward.go
index 28abbed..5f4da5c 100644
--- a/commands/msg/forward.go
+++ b/commands/msg/forward.go
@@ -77,7 +77,7 @@ func (forward) Execute(aerc *widgets.Aerc, args []string) error {
 	addTab := func() (*widgets.Composer, error) {
 		if template != "" {
 			original.From = models.FormatAddresses(msg.Envelope.From)
-			original.Date = msg.Envelope.Date.Format("Mon Jan 2, 2006 at 3:04 PM")
+			original.Date = msg.Envelope.Date
 		}
 
 		composer, err := widgets.NewComposer(aerc, acct, aerc.Config(), acct.AccountConfig(),
diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index 28ce245..1deab31 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -133,7 +133,7 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
 	addTab := func() error {
 		if template != "" {
 			original.From = models.FormatAddresses(msg.Envelope.From)
-			original.Date = msg.Envelope.Date.Format("Mon Jan 2, 2006 at 3:04 PM")
+			original.Date = msg.Envelope.Date
 		}
 
 		composer, err := widgets.NewComposer(aerc, acct, aerc.Config(),