Close open ranges now instead of dropping them in the time-table mode

This commit is contained in:
Campbell Alden 2024-09-10 21:53:59 +09:00
parent 0884006809
commit 63861a8d32

View file

@ -71,7 +71,10 @@ fn all_at_once(is_terminal: bool) -> Result<Vec<Duration>> {
} }
} }
if let Some(unpaired) = seen { if let Some(unpaired) = seen {
println!("Ended with an open span from {unpaired}... Ignoring"); let now = Local::now().naive_local().time();
let last = adjust_last(&now, parse_time(&unpaired)?.time());
println!("Ended with an open span from {unpaired}... assuming now: {}", now.format("%H:%M"));
durations.push(now - last);
} }
return Ok(durations); return Ok(durations);
} }