Commits

Luke Plant  committed 588aa43

Use Data.Time instead of System.Time where possible

  • Participants
  • Parent commits 5f1022a

Comments (0)

Files changed (1)

File src/Blog/Templates.hs

 import Blog.Links
 import Blog.Utils (escapeHtmlStringT)
 import Data.Maybe (fromJust)
+import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
+import Data.Time.Format (formatTime)
 import Ella.GenUtils (utf8)
 import System.Locale (defaultTimeLocale)
-import System.Time (toUTCTime, formatCalendarTime)
-import System.Time.Utils (epochToClockTime)
 import Text.XHtml
 import Text.StringTemplate
 import Text.StringTemplate.Classes (SElem(..))
                   then "Anonymous Coward"
                   else name
 
-showDate timestamp = formatCalendarTime defaultTimeLocale  "%e %B %Y" (toUTCTime $ epochToClockTime timestamp)
+showDate timestamp = formatTime defaultTimeLocale "%e %B %Y" $ posixSecondsToUTCTime $ realToFrac timestamp
 
 -- HStringTemplate related: