diff --git a/src/output/table.rs b/src/output/table.rs index 90fb236..4392401 100644 --- a/src/output/table.rs +++ b/src/output/table.rs @@ -1,4 +1,5 @@ use std::cmp::max; +use std::env; use std::fmt; use std::ops::Deref; use std::sync::{Mutex, MutexGuard}; @@ -286,7 +287,12 @@ impl Environment { } fn determine_time_zone() -> TZResult { - TimeZone::from_file("/etc/localtime") + let tz = env::var("TZ"); + if tz.is_err() { + return TimeZone::from_file("/etc/localtime"); + } else { + return TimeZone::from_file(format!("/usr/share/zoneinfo/{}", tz.unwrap())); + } }