I am writing a getSitemapR handler that uses the yesod-sitemap file to create a sitemap. The problem I am having is converting String to UTCTime as defined in Data.Time.Clock . The haddock documentation says that UTCTime is an instance of the Read class, so I'm trying. Here is my code.
module Handler.Root where import Import import Yesod.Goodies.Gravatar import Data.Time.Format import System.Locale
I looked at my copy of Real World Haskell in chapter 20 on system programming, but does not cover UTCTime in it with code samples, I searched google with the term haskell Convert a String to UTCTime "without any results. I found the following Thread on the haskell mailing list- cafe, which will not work because SitemapLastMod does not accept Maybe UTCTime , I think I'm making a really stupid mistake here, but I'm not sure if anyone could point me in the right direction?
Thank you for your time and attention.
source share