From 45484abea76d7aaaaf6c17b4910465aeb3edddde Mon Sep 17 00:00:00 2001 From: DustInDark Date: Thu, 16 Jun 2022 17:49:25 +0900 Subject: [PATCH] fixed warning --- src/detections/configs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detections/configs.rs b/src/detections/configs.rs index 6e7abf4f..e4a4e88f 100644 --- a/src/detections/configs.rs +++ b/src/detections/configs.rs @@ -296,8 +296,8 @@ impl TargetEventTime { pub fn new() -> Self { let mut parse_success_flag = true; let start_time = if let Some(s_time) = &CONFIG.read().unwrap().args.start_timeline { - match DateTime::parse_from_str(&s_time, "%Y-%m-%d %H:%M:%S %z") // 2014-11-28 21:00:09 +09:00 - .or_else(|_| DateTime::parse_from_str(&s_time, "%Y/%m/%d %H:%M:%S %z")) // 2014/11/28 21:00:09 +09:00 + match DateTime::parse_from_str(s_time, "%Y-%m-%d %H:%M:%S %z") // 2014-11-28 21:00:09 +09:00 + .or_else(|_| DateTime::parse_from_str(s_time, "%Y/%m/%d %H:%M:%S %z")) // 2014/11/28 21:00:09 +09:00 { Ok(dt) => Some(dt.with_timezone(&Utc)), Err(_) => {