Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date property is not initialized correctly when passed as Header in MimeMessage constructor #840

Closed
VikKol opened this issue Sep 29, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@VikKol
Copy link

VikKol commented Sep 29, 2022

When passing 'Date' header in MimeMessage constructor, Date property is not initialized correctly.
DateTimeOffset.UtcNow is used instead of the header value.

Code example:

var dateTimeString = "Thu, 29 Sep 2022 09:52:47 +0000";
var message = new MimeMessage(new Header(HeaderId.Date, dateTimeString));
message.Date == DateTimeOffset.Parse(dateTimeString); // returns false

MimeKit Version: 3.3.0

jstedfast added a commit that referenced this issue Sep 29, 2022
@jstedfast jstedfast added the bug Something isn't working label Sep 29, 2022
@jstedfast
Copy link
Owner

Good catch, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants