Browse Source

Fixed Year bug

master
Shaun Kerr 6 years ago
parent
commit
5d13596b6f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      Main.hs

+ 1
- 1
Main.hs View File

@@ -33,7 +33,7 @@ instance Yesod ProtocolSeven
getHomeR :: Handler Html getHomeR :: Handler Html
getHomeR = defaultLayout $ do getHomeR = defaultLayout $ do
-- Date / Time stuff -- 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 (year, month, day) = (\[a,b,c] -> (a,b,c)) $ map (\x -> read x :: Integer) $ words sTimeDate
let nextMonth = (month + 1) `mod` 12 let nextMonth = (month + 1) `mod` 12
let ts = toTS (year, month, day) let ts = toTS (year, month, day)


Loading…
Cancel
Save