summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 3e2b8bc..03bf646 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -77,6 +77,15 @@ lazy_static! {
static ref HOME_DIR: Option<PathBuf> = dirs_next::home_dir();
static ref USERNAME: String = whoami::username();
static ref HOSTNAME: String = whoami::hostname();
+
+ static ref TIMEZONE_STR: String = {
+ let offset = chrono::Local::now().offset().local_minus_utc() / 3600;
+ if offset.is_positive() {
+ format!(" UTC+{} ", offset.abs())
+ } else {
+ format!(" UTC-{} ", offset.abs())
+ }
+ };
}
#[derive(Clone, Debug, StructOpt)]