diff --git a/src/output/table.rs b/src/output/table.rs index a638e77..490e712 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}; @@ -291,7 +292,11 @@ impl Environment { } fn determine_time_zone() -> TZResult { - TimeZone::from_file("/etc/localtime") + if let Ok(file) = env::var("TZ") { + TimeZone::from_file(format!("/usr/share/zoneinfo/{}", file)) + } else { + TimeZone::from_file("/etc/localtime") + } }