about summary refs log tree commit diff
path: root/services/tazblog/src/RSS.hs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-08-22T17·58+0100
committerVincent Ambo <tazjin@google.com>2019-08-22T17·58+0100
commitbd47122afb7d3da60ff61f6ca74994a133cc7a0c (patch)
tree2ffc76c71d79da5511521793faa193bcd4fd2168 /services/tazblog/src/RSS.hs
parentc5ef3e01b27b220d6b8c2b16584e752c69966e3d (diff)
chore(blog): Minor changes to integrate DNS based backend r/51
Diffstat (limited to 'services/tazblog/src/RSS.hs')
-rw-r--r--services/tazblog/src/RSS.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/services/tazblog/src/RSS.hs b/services/tazblog/src/RSS.hs
index 5d2340d529..02a2aafda9 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