mirror of
https://github.com/stalwartlabs/mail-parser.git
synced 2026-11-30 00:01:25 +00:00
Updated roundtip date conversion tests
This commit is contained in:
@@ -488,7 +488,10 @@ pub static MONTH_MAP: &[u8; 31] = &[
|
||||
mod tests {
|
||||
use chrono::{FixedOffset, LocalResult, SecondsFormat, TimeZone, Utc};
|
||||
|
||||
use crate::parsers::{fields::load_tests, MessageStream};
|
||||
use crate::{
|
||||
parsers::{fields::load_tests, MessageStream},
|
||||
DateTime,
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn parse_dates() {
|
||||
@@ -528,6 +531,8 @@ mod tests {
|
||||
.unwrap()
|
||||
.to_rfc3339_opts(SecondsFormat::Secs, true)
|
||||
);
|
||||
let ts = datetime.to_timestamp();
|
||||
assert_eq!(DateTime::from_timestamp(ts).to_timestamp(), ts);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
|
||||
Reference in New Issue
Block a user