From 0a4d3c8f12dc5797a919a00b6bcaf759947687cc Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 17 Jun 2018 23:24:47 +0200 Subject: Add ouest france parser --- src/executable/haskell/Utils/Time.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/executable/haskell/Utils/Time.hs (limited to 'src/executable/haskell/Utils/Time.hs') diff --git a/src/executable/haskell/Utils/Time.hs b/src/executable/haskell/Utils/Time.hs new file mode 100644 index 0000000..b6045a7 --- /dev/null +++ b/src/executable/haskell/Utils/Time.hs @@ -0,0 +1,14 @@ +module Utils.Time + ( getCurrentFormattedTime + ) where + +import Data.Text (Text) +import qualified Data.Text as T + +import Data.Time.Format (defaultTimeLocale, formatTime) +import Data.Time.LocalTime (getZonedTime) + +getCurrentFormattedTime :: IO Text +getCurrentFormattedTime = do + zonedTime <- getZonedTime + return (T.pack $ formatTime defaultTimeLocale "%Hh%M" zonedTime) -- cgit v1.2.3