Opened 2 years ago

Closed 2 years ago

#18230 closed bug (fixed)

Mail: wrong date format in heading of forwarded mail

Reported by: humdinger Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Mail Kit Version: R1/beta4
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

When you forward an email, you get a header at the top:

------ Forwarded Message: ------

To: humdinger@…
From: BlueSky via Haiku Community <discourse@…>
Subject: [Haiku Community] [Help] Vcard2people bash script
Date: 1674035128

The date is just a long number (ime_t?). I tried to track it down, but the Mail app + kit is too much a jungle for my tiny brain...

Change History (3)

comment:1 by madmax, 2 years ago

Component: Applications/MailKits/Mail Kit

Untested, but his seems to be:
header << "Date: " << Date() << "\n\n"; in BEmailMessage::ForwardMessage. There since the beginning, some 18 years ago.
BEmailMessage::Date() parses the header field and returns a time_t as you suspected. It just returned the header before this change in 2015.

I guess ForwardMessage should format that or directly use HeaderField("Date") instead.

comment:2 by humdinger, 2 years ago

Thanks, that does indeed work! Proposed patch: https://review.haiku-os.org/c/haiku/+/6010

comment:3 by humdinger, 2 years ago

Resolution: fixed
Status: newclosed

Fixed with hrev56723. Thanks everyone!

Note: See TracTickets for help on using tickets.