chore: update chrono from 0.4.34 to 0.4.37

This commit is contained in:
link2xt
2024-04-03 16:16:24 +00:00
parent ace281ff6c
commit f1c6cd69e9
5 changed files with 11 additions and 12 deletions

View File

@@ -575,11 +575,7 @@ impl<'a> MimeFactory<'a> {
.protected
.push(Header::new("Subject".into(), encoded_subject));
let date = chrono::Utc
.from_local_datetime(
&chrono::NaiveDateTime::from_timestamp_opt(self.timestamp, 0)
.context("can't convert timestamp to NativeDateTime")?,
)
let date = chrono::DateTime::<chrono::Utc>::from_timestamp(self.timestamp, 0)
.unwrap()
.to_rfc2822();
headers.unprotected.push(Header::new("Date".into(), date));