From cc657d75f6e9661963aad84465ca68c1be87ac07 Mon Sep 17 00:00:00 2001 From: xmppftw Date: Mon, 3 Jun 2024 16:27:24 +0200 Subject: [PATCH] Remove chrono warning and replace with TODO --- src/poezio_logs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/poezio_logs.rs b/src/poezio_logs.rs index 4fe936d..f7e8269 100644 --- a/src/poezio_logs.rs +++ b/src/poezio_logs.rs @@ -81,7 +81,8 @@ pub fn parse_datetime(i: &str) -> IResult<&str, DateTime> { map_res(take(2usize), u32::from_str), tag("Z"), ))(i)?; - Ok((i, Utc.ymd(year, month, day).and_hms(hour, minute, second))) + // TODO: handle DST and other time transitions + Ok((i, Utc.with_ymd_and_hms(year, month, day, hour, minute, second).single().unwrap())) } pub fn parse_log_info(i: &str) -> IResult<&str, LogInfo> {