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.
This commit is contained in:
Reto Brunner 2020-06-26 09:25:53 +02:00
parent 91db250272
commit 8f1c6c46ff
4 changed files with 5 additions and 6 deletions
commands/msg

View file

@ -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(),

View file

@ -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(),