Using UTCTime with SQLite in Yesod Using UTCTime with SQLite in Yesod sqlite sqlite

Using UTCTime with SQLite in Yesod


You stored a Text value "09:18:07", while it expected a UTCTime value. Did you insert values by hand?

getCurrentTime from Data.Time returns a value of type IO UTCTime, so you can either use putStr getCurrentTime in GHCI to get a valid representation, or use now <- liftIO getCurrentTime in your function.

EDIT:Because getCurrentTime returns a timestamp like: 2013-10-25 10:16:32.1627238 UTC, inserting a value like that in your database should resolve the error.