Explorar el Código

Fixed Year bug

master
Shaun Kerr hace 6 años
padre
commit
5d13596b6f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      Main.hs

+ 1
- 1
Main.hs Ver fichero

@@ -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)


Cargando…
Cancelar
Guardar