aboutsummaryrefslogtreecommitdiff
path: root/client/src/Util/Date.hs
blob: 8fad88124329ac59902b8ad4be681a8918984cb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module Util.Date
  ( utcToLocalDay
  ) where

import           Data.Time.Calendar  (Day)
import           Data.Time.Clock     (UTCTime)
import qualified Data.Time.LocalTime as LocalTime

utcToLocalDay :: UTCTime -> IO Day
utcToLocalDay time = do
  timezone <- LocalTime.getCurrentTimeZone
  return . LocalTime.localDay $ LocalTime.utcToLocalTime timezone time