title: converting a String to type UTCTime
body: <p>I'm writing a <code>getSitemapR</code> handler that uses yesod-sitemap to generate a sitemap file. The issue I'm having is converting a <code>String</code> into <code>UTCTime</code> as defined in <code>Data.Time.Clock</code>. The haddock documentation says that <code>UTCTime</code> is an instance of the <code>Read</code> typeclass, so that's what I'm trying. Here's my code.</p>
  
  <pre><code>module Handler.Root where
  
  import Import
  import Yesod.Goodies.Gravatar
  import Data.Time.Format
  import System.Locale
  -- This is a handler function for the GET request method on the RootR
  -- resource pattern. All of your resource patterns are defined in
  -- config/routes
  --
  -- The majority of the code you will write in Yesod lives in these handler
  -- functions. You can spread them across multiple files if you are so
  -- inclined, or create a single monolithic file.
  getRootR :: Handler RepHtml
  getRootR = do
      defaultLayout $ do
          h2id &lt;- lift newIdent
          setTitle "Cloudrr homepage"
          $(widgetFile "homepage")
  
  gravatar :: Text -&gt; String
  gravatar email = 
    gravatarImg email go
    where
      go = GravatarOptions {
        gSize = Just (Size 140)
        , gDefault = Just (Identicon)
        , gForceDefault = ForceDefault False
        , gRating = Just (PG)
        }
  
  getSitemapR :: Handler RepXml
  getSitemapR = do
    sitemap [smo RootR]
    where
      smo = SitemapUrl  SitemapR{
        sitemapLoc = "http://www.cloudrr.me/sitemap.xml"
        , sitemapLastMod = (read "2011-11-19 18:28:r52.607875 UTC")::UTCTime
        , sitemapChangeFreq = Weekly
        , priority = 0.7
        }
  </code></pre>
  
  <p>I've looked through my copy of <em>Real World Haskell</em> in chapter 20 on systems programming, but it doesn't cover <code>UTCTime</code> in it's code samples, I've searched google with the term 'haskell "Convert a String to UTCTime"' with no results. I found the following <a href="http://osdir.com/ml/haskell-cafe@haskell.org/2011-06/msg00586.html" rel="nofollow">Thread</a> in the haskell-cafe mailing list which won't work because <code>SitemapLastMod</code> doesn't take a <code>Maybe UTCTime</code>. I think I'm making a really stupid mistake here, but I'm not sure, could someone please point me in the right direction?</p>
  
  <p>Thank you for your time and consideration.</p>