diff options
Diffstat (limited to 'src/Time.hs')
-rw-r--r-- | src/Time.hs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Time.hs b/src/Time.hs index a7fb418..99d47d0 100644 --- a/src/Time.hs +++ b/src/Time.hs @@ -5,13 +5,10 @@ module Time import Data.Text (Text) import qualified Data.Text as T -import Data.Time.Clock (getCurrentTime) -import Data.Time.LocalTime (getCurrentTimeZone, utcToLocalTime) +import Data.Time.LocalTime (getZonedTime) import Data.Time.Format (formatTime, defaultTimeLocale) getCurrentFormattedTime :: IO Text getCurrentFormattedTime = do - currentTime <- getCurrentTime - timeZone <- getCurrentTimeZone - let localTime = utcToLocalTime timeZone currentTime - return (T.pack $ formatTime defaultTimeLocale "%Hh%M" localTime) + zonedTime <- getZonedTime + return (T.pack $ formatTime defaultTimeLocale "%Hh%M" zonedTime) |