Skip to content

Commit

Permalink
Revert "Handle missing year WIP"
Browse files Browse the repository at this point in the history
This reverts commit 49f73dd.
  • Loading branch information
guilload committed Mar 27, 2024
1 parent b620067 commit 759f66f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
3 changes: 0 additions & 3 deletions quickwit/quickwit-datetime/src/date_time_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ impl StrptimeParser {
parsed.set_minute(0u8);
parsed.set_second(0u8);
}
if parsed.year().is_none() {
parsed.set_year(OffsetDateTime::now_utc().year());
}
let date_time = parsed.try_into()?;
Ok(date_time)
}
Expand Down
20 changes: 0 additions & 20 deletions quickwit/quickwit-datetime/src/date_time_parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,26 +247,6 @@ mod tests {
"2024-01-31 18:40:19.950188123",
datetime!(2024-01-31 18:40:19.950188123 UTC),
),
(
"%Y-%m-%d %H:%M:%S.%f",
"2024-01-31 18:40:19.950188123",
datetime!(2024-01-31 18:40:19.950188123 UTC),
),
(
"%Y-%m-%d %H:%M:%S.%f",
"2024-01-31 18:40:19.950188123",
datetime!(2024-01-31 18:40:19.950188123 UTC),
),
(
"%b %d %H:%M:%S",
"Mar 6 17:40:02",
datetime!(2024-03-06 17:40:02 UTC),
),
(
"%Y %b %d %H:%M:%S",
"2024 Mar 6 17:40:02",
datetime!(2024-03-06 17:40:02 UTC),
),
];
for (fmt, date_time_str, expected) in test_data {
let parser = StrptimeParser::from_str(fmt).unwrap();
Expand Down

0 comments on commit 759f66f

Please sign in to comment.