diff options
Diffstat (limited to 'src/Xmobar/Plugins/DateZone.hs')
-rw-r--r-- | src/Xmobar/Plugins/DateZone.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Xmobar/Plugins/DateZone.hs b/src/Xmobar/Plugins/DateZone.hs index 22be6c2..35767a8 100644 --- a/src/Xmobar/Plugins/DateZone.hs +++ b/src/Xmobar/Plugins/DateZone.hs @@ -28,6 +28,9 @@ import Xmobar.Run.Exec import Control.Concurrent.STM import System.IO.Unsafe +import System.Environment (lookupEnv) + +import Data.Maybe (fromMaybe) import Data.Time.Format import Data.Time.LocalTime @@ -63,7 +66,8 @@ instance Exec DateZone where locale <- getTimeLocale atomically $ putTMVar localeLock lock if z /= "" then do - timeZone <- getTimeZoneSeriesFromOlsonFile ("/usr/share/zoneinfo/" ++ z) + tzdir <- lookupEnv "TZDIR" + timeZone <- getTimeZoneSeriesFromOlsonFile ((fromMaybe "/usr/share/zoneinfo" tzdir) ++ "/" ++ z) go (dateZone f locale timeZone) else go (date f locale) |