Display times in local timezone instead of UTC
This commit is contained in:
parent
57c9891d9b
commit
51d3cef75f
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::sync::{Arc};
|
use std::sync::{Arc};
|
||||||
use chrono::{Duration, Utc};
|
use chrono::{Duration, Local, Utc};
|
||||||
use tokio::sync::{RwLock, RwLockReadGuard};
|
use tokio::sync::{RwLock, RwLockReadGuard};
|
||||||
use tokio::time::sleep;
|
use tokio::time::sleep;
|
||||||
use crate::{SharedData};
|
use crate::{SharedData};
|
||||||
|
@ -25,13 +25,14 @@ async fn print_info<'a>(data: RwLockReadGuard<'a, SharedData>, min_len_series: &
|
||||||
print!("\x1B[2J\x1B[1;1H");
|
print!("\x1B[2J\x1B[1;1H");
|
||||||
println!(
|
println!(
|
||||||
"##[Ascendance of a Bookworm Bot]## | Time: {}",
|
"##[Ascendance of a Bookworm Bot]## | Time: {}",
|
||||||
Utc::now().naive_local().format("%H:%M:%S")
|
Local::now().naive_local().format("%H:%M:%S")
|
||||||
);
|
);
|
||||||
println!("Instance: {}", data.config.instance);
|
println!("Instance: {}", data.config.instance);
|
||||||
println!(
|
println!(
|
||||||
"Ran Last: {} | Config Reload Interval: {}",
|
"Ran Last: {} | Config Reload Interval: {}",
|
||||||
data
|
data
|
||||||
.start
|
.start
|
||||||
|
.with_timezone(&Local)
|
||||||
.naive_local()
|
.naive_local()
|
||||||
.format("%d/%m/%Y %H:%M:%S"),
|
.format("%d/%m/%Y %H:%M:%S"),
|
||||||
data.config.config_reload_seconds
|
data.config.config_reload_seconds
|
||||||
|
|
Loading…
Reference in a new issue