Skip to content

Commit

Permalink
Add date time parsing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
guilload committed Apr 8, 2024
1 parent 9060737 commit fb69bdb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions quickwit/quickwit-datetime/src/date_time_parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ mod tests {
let year = infer_year(Some(Month::March), now.month(), now.year());
dt.replace_year(year).unwrap()
}),
(
"%Y-%m-%dT%H:%M:%S.%f%z",
"2024-03-21T03:45:02.561820768-0400",
datetime!(2024-03-21 03:45:02.561820768 -04:00),
),
];
for (fmt, date_time_str, expected) in test_data {
let parser = StrptimeParser::from_str(fmt).unwrap();
Expand Down

0 comments on commit fb69bdb

Please sign in to comment.