From 415c48d855e16a7c32b873ebfd2116fcba16b56a Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 25 Jan 2009 06:47:05 +0000 Subject: [PATCH] getCurrentLocalTime --- Ledger/Utils.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Ledger/Utils.hs b/Ledger/Utils.hs index 2bbe1b247..5aadf7379 100644 --- a/Ledger/Utils.hs +++ b/Ledger/Utils.hs @@ -233,6 +233,13 @@ spacenonewline = satisfy (\c -> c `elem` " \v\f\t") restofline :: GenParser Char st String restofline = anyChar `manyTill` newline +-- time + +getCurrentLocalTime :: IO LocalTime +getCurrentLocalTime = do + t <- getCurrentTime + tz <- getCurrentTimeZone + return $ utcToLocalTime tz t