From bd47122afb7d3da60ff61f6ca74994a133cc7a0c Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 22 Aug 2019 18:58:11 +0100 Subject: chore(blog): Minor changes to integrate DNS based backend --- services/tazblog/src/RSS.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'services/tazblog/src/RSS.hs') diff --git a/services/tazblog/src/RSS.hs b/services/tazblog/src/RSS.hs index 5d2340d5292f..02a2aafda969 100644 --- a/services/tazblog/src/RSS.hs +++ b/services/tazblog/src/RSS.hs @@ -5,7 +5,7 @@ import qualified Data.Text as T import Control.Monad (liftM) import Data.Maybe (fromMaybe) -import Data.Time (UTCTime, getCurrentTime) +import Data.Time (UTCTime(..), getCurrentTime, secondsToDiffTime) import Network.URI import Text.RSS @@ -13,11 +13,11 @@ import BlogStore import Locales createChannel :: BlogLang -> UTCTime -> [ChannelElem] -createChannel l now = [ Language $ show l - , Copyright "Vincent Ambo" - , WebMaster "tazjin@gmail.com" - , ChannelPubDate now - ] +createChannel l now = [ Language $ show l + , Copyright "Vincent Ambo" + , WebMaster "tazjin@gmail.com" + , ChannelPubDate now + ] createRSS :: BlogLang -> UTCTime -> [Item] -> RSS createRSS l t = RSS (rssTitle l) (rssLink l) (rssDesc l) (createChannel l t) @@ -26,7 +26,7 @@ createItem :: Entry -> Item createItem Entry{..} = [ Title $ T.unpack title , Link $ makeLink lang entryId , Description $ T.unpack btext - , PubDate edate] + , PubDate $ UTCTime edate $ secondsToDiffTime 0 ] makeLink :: BlogLang -> EntryId -> URI makeLink l i = let url = "http://tazj.in/" ++ show l ++ "/" ++ show i -- cgit 1.4.1