summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJonathan Grochowski <jongrocho@gmail.com>2012-03-03 22:54:36 -0800
committerJonathan Grochowski <jongrocho@gmail.com>2012-03-03 22:54:36 -0800
commit20eb4cfb330b2a7ed9849823d8c25c8cfb46347a (patch)
tree830db43eeee7805d2c0c83188595513aa8683413 /src
parent928e97953dd0ee086d61623586d5523164e25c15 (diff)
downloadxmobar-20eb4cfb330b2a7ed9849823d8c25c8cfb46347a.tar.gz
xmobar-20eb4cfb330b2a7ed9849823d8c25c8cfb46347a.tar.bz2
Update the DateZone plugin to use newer time package
Just as the Date plugin used the old-time package which would honor all the available flags, so too did the DateZone plugin.
Diffstat (limited to 'src')
-rw-r--r--src/Plugins/DateZone.hs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/Plugins/DateZone.hs b/src/Plugins/DateZone.hs
index 86114bb..79596c9 100644
--- a/src/Plugins/DateZone.hs
+++ b/src/Plugins/DateZone.hs
@@ -34,7 +34,6 @@ import Data.Time.LocalTime.TimeZone.Series
import System.IO.Unsafe
import System.Locale (TimeLocale)
-import System.Time
@@ -62,11 +61,9 @@ instance Exec DateZone where
where go func = func >>= cb >> tenthSeconds r >> go func
date :: String -> TimeLocale -> IO String
-date format loc = do
- t <- toCalendarTime =<< getClockTime
- return $ formatCalendarTime loc format t
+date format loc = getZonedTime >>= return . formatTime loc format
dateZone :: String -> TimeLocale -> TimeZoneSeries -> IO String
-dateZone format loc timeZone = do
- zonedTime <- getZonedTime
- return $ formatTime loc format $ utcToLocalTime' timeZone $ zonedTimeToUTC zonedTime
+dateZone format loc timeZone = getZonedTime >>= return . formatTime loc format . utcToLocalTime' timeZone . zonedTimeToUTC
+-- zonedTime <- getZonedTime
+-- return $ formatTime loc format $ utcToLocalTime' timeZone $ zonedTimeToUTC zonedTime