fixed warning

This commit is contained in:
DustInDark
2022-06-16 17:49:25 +09:00
parent b3dadb1559
commit 45484abea7

View File

@@ -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(_) => {