Fixed Year bug

This commit is contained in:
Shaun Kerr 2018-07-02 16:31:37 +12:00
parent 2611f8a8e2
commit 5d13596b6f

View File

@ -33,7 +33,7 @@ instance Yesod ProtocolSeven
getHomeR :: Handler Html
getHomeR = defaultLayout $ do
-- Date / Time stuff
sTimeDate <- io $ getZonedTime >>= return . (formatTime defaultTimeLocale "%y %m %d")
sTimeDate <- io $ getZonedTime >>= return . (formatTime defaultTimeLocale "%Y %m %d")
let (year, month, day) = (\[a,b,c] -> (a,b,c)) $ map (\x -> read x :: Integer) $ words sTimeDate
let nextMonth = (month + 1) `mod` 12
let ts = toTS (year, month, day)