Updated roundtip date conversion tests

This commit is contained in:
mdecimus
2025-08-18 12:03:32 +01:00
parent 957185aed4
commit 6c5d330285
+6 -1
View File
@@ -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);
}
}
_ => {}