]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix pastebin Atom feed
authorSlava Pestov <slava@factorcode.org>
Sat, 8 Dec 2007 22:18:25 +0000 (17:18 -0500)
committerSlava Pestov <slava@factorcode.org>
Sat, 8 Dec 2007 22:18:25 +0000 (17:18 -0500)
extra/webapps/pastebin/paste-summary.furnace
extra/webapps/pastebin/pastebin.factor
extra/webapps/pastebin/show-paste.furnace

index a50f0ca14064c1a1b831803b1df65d39572e9b3f..f8938eabca2e295dd09c477eccaa240f09c834b0 100644 (file)
@@ -1,4 +1,5 @@
-<% USING: continuations namespaces io kernel math math.parser furnace webapps.pastebin ; %>
+<% USING: continuations namespaces io kernel math math.parser
+furnace webapps.pastebin calendar ; %>
 
 <tr>
     <td>
@@ -7,5 +8,5 @@
         </a>
     </td>
     <td><% "author" get write %></td>
-    <td><% "date" get print %></td>
+    <td><% "date" get timestamp>string print %></td>
 </tr>
index 555670e7fad2c1b69b4d5c43cbfce88409544c7c..48154fef854560d749463aa8969769f83d741581 100755 (executable)
@@ -60,7 +60,7 @@ SYMBOL: store
             paste-summary
             paste-link
             paste-date
-        } get-slots "" swap <entry>
+        } get-slots timestamp>rfc3339 f swap <entry>
     ] map ;
 
 : feed.xml ( -- )
@@ -75,7 +75,7 @@ SYMBOL: store
     store get-global save-store ;
 
 : add-paste ( paste pastebin -- )
-    >r now timestamp>http-string over set-paste-date r>
+    >r now over set-paste-date r>
     pastebin-pastes 2dup length swap set-paste-n push ;
 
 : submit-paste ( summary author channel mode contents -- )
index 56255dcd9523ac113a74858c7557b0c241261e1d..6a781353439b0a4788cbeb303e8ee82d7c45763d 100755 (executable)
@@ -1,4 +1,4 @@
-<% USING: namespaces io furnace sequences xmode.code2html ; %>
+<% USING: namespaces io furnace sequences xmode.code2html calendar ; %>
 
 <%
     "Paste: " "summary" get append "title" set
@@ -8,7 +8,7 @@
 <table>
 <tr><th>Paste by:</th><td><% "author" get write %></td></tr>
 <tr><th>Channel:</th><td><% "channel" get write %></td></tr>
-<tr><th>Created:</th><td><% "date" get write %></td></tr>
+<tr><th>Created:</th><td><% "date" get timestamp>string write %></td></tr>
 <tr><th>File type:</th><td><% "mode" get write %></td></tr>
 </table>