Using UTCTime with Hamlet
I am using Yesod on my first site and I have a list of news items: NewsItem date UTCTime default=CURRENT_TIME title String content String author String which are retrieved in my handler: newsitems <- runDB $ selectList [] [Desc NewsItemDate] and ultimately used in my template: $if null newsitems <p>No news. $else $forall Entity id entry <- newsitems <article> <h4>#{newsItemDate entry} <p>#{newsItemContent entry} But I get an error about datatypes: Handler/Home.hs:20:11: No instance for (Text.Blaze.ToMarkup time-1.4:Data.Time.Clock.UTC.UTCTime) arising from a use of `toHtml' Possible fix: add