Simplify the now string
This commit is contained in:
parent
b6d1c0ea0c
commit
9087e69c79
3 changed files with 4 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -384,7 +384,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "time-track"
|
name = "time-track"
|
||||||
version = "2.1.1"
|
version = "2.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "time-track"
|
name = "time-track"
|
||||||
version = "2.1.1"
|
version = "2.1.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,8 @@ fn main() -> Result<()> {
|
||||||
|
|
||||||
if let Some(remaining) = first {
|
if let Some(remaining) = first {
|
||||||
let now = Local::now();
|
let now = Local::now();
|
||||||
println!("Ended with unclosed span... assuming ending now: {}", now.time());
|
let now_str = now.format("%-I:%M %p");
|
||||||
|
println!("Ended with unclosed span... assuming ending now: {}", now_str);
|
||||||
total_minutes += (now - remaining).num_minutes();
|
total_minutes += (now - remaining).num_minutes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue