fix: bug in delta output

wrongly used buffer to output delta. Changed to use local.now() time
instead.
This commit is contained in:
Christina Sørensen 2024-05-02 16:53:08 +02:00
parent 9ac3593b04
commit c76f17a51e
Signed by: cafkafk
GPG key ID: 26C542FD97F965CE

View file

@ -14,7 +14,10 @@ fn main() -> io::Result<()> {
let local: DateTime<Local> = Local::now(); let local: DateTime<Local> = Local::now();
println!("delta: \t\t{time_only} -> {buffer}"); println!(
"delta: \t\t{time_only} -> {}",
local.time().format("%H:%M:%S").to_string()
);
let dt = NaiveTime::signed_duration_since(local.time(), time_only); let dt = NaiveTime::signed_duration_since(local.time(), time_only);