aboutsummaryrefslogtreecommitdiff
path: root/src/Time.hs
blob: 97a931726263e0eeb0b0bd070a920e60aa6745f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module Time
  ( formatCurrentLocale
  ) where

import Data.Text (Text)
import qualified Data.Text as T
import Data.Time.LocalTime (getZonedTime)
import Data.Time.Format (formatTime, defaultTimeLocale)

formatCurrentLocale :: Text -> IO Text
formatCurrentLocale format =
  T.pack <$> formatTime defaultTimeLocale (T.unpack format) <$> getZonedTime