Skip to content

Commit

Permalink
Display time with local timezone instead of UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrzej Klajnert committed Apr 29, 2021
1 parent c5f52ed commit 1466cfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "idesk"
version = "0.1.11"
version = "0.1.12"
authors = ["Andrzej Klajnert <[email protected]>"]
edition = "2018"
description = "Control the IDASEN desk position via bluetooth."
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use clap::{crate_description, crate_name, crate_version, App, Arg, ArgMatches};
use idasen::{get_instance, Device, Idasen};

use crate::config::Config;
use chrono::{DateTime, Utc};
use chrono::{DateTime, Local};
use std::time::SystemTime;

mod config;
Expand Down Expand Up @@ -108,7 +108,7 @@ fn move_to(position: &str, config: &mut Config) {
.expect("Failed to adjust desk position.");
}
let system_time = SystemTime::now();
let datetime: DateTime<Utc> = system_time.into();
let datetime: DateTime<Local> = system_time.into();

println!(
"Desk moved at {}. Desired position: {}cm, achieved position: {}cm",
Expand Down

0 comments on commit 1466cfb

Please sign in to comment.