summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--template/atom.ht4
-rw-r--r--trivium.rb1
2 files changed, 3 insertions, 2 deletions
diff --git a/template/atom.ht b/template/atom.ht
index af4e45c..a6f84a6 100644
--- a/template/atom.ht
+++ b/template/atom.ht
@@ -29,8 +29,8 @@ $ self[:entries].each { |entry|
     <link rel="alternate" type="text/html"
 	  href="http://chneukirchen.org/trivium/${entry[:id]}" />
     <id>tag:chneukirchen.org,2008:trivium-${entry[:id]}</id>
-    <updated>${entry[:date].iso8601}</updated>
-    <published>${self[:time].iso8601}</published>
+    <updated>${entry[:updated].iso8601}</updated>
+    <published>${entry[:date].iso8601}</published>
     <content type="html">
 ${format(entry)}
     </content>
diff --git a/trivium.rb b/trivium.rb
index 2470a00..a3e740b 100644
--- a/trivium.rb
+++ b/trivium.rb
@@ -20,6 +20,7 @@ def parse(f)
   entry = {:body => body, :id => File.basename(f, ".entry"), :file => f}
   head.scan(/(\w+): *(.*)/) { entry[$1.downcase.to_sym] = $2 }
   entry[:date] = Time.parse(entry[:date])  if entry[:date]
+  entry[:updated] = entry[:updated] ? Time.parse(entry[:updated]) : entry[:date]
   entry[:title] = entry[:date].strftime("%d%b%Y").downcase  if entry[:date]
   entry
 end