NOW bug fixed

main
Bel LaPointe 2024-12-04 16:17:26 -07:00
parent a39187a417
commit 64e30da785
1 changed files with 2 additions and 2 deletions

View File

@ -120,9 +120,9 @@ fn log(f: &String, enabled: &bool, since: &Option<String>, verbose: &bool, preci
curr.d = 0.0;
}
let mut d = 1.0;
if curr.xs.len() == 0 {
if x.x.len() == 0 { // clock ins get duration zero
d = 0.0;
} else if i > 0 {
} else if i > 0 && tsheet.xs[i].timestamp(&0) == tsheet.xs[i-1].timestamp(&0) { // if same day as previous then use elapsed as duration
d = ((tsheet.xs[i].t - tsheet.xs[i-1].t) as f32 / (60.0*60.0)) as f32;
}
if *verbose {