Browse Source

timestamps converted to unix timestamps

master
Christian Mueller 12 years ago
parent
commit
ad97dad583
  1. 7
      src/notehub/handler.clj
  2. 2
      src/notehub/storage.clj

7
src/notehub/handler.clj

@ -128,8 +128,11 @@
[:h3.central-element.helvetica statistics] [:h3.central-element.helvetica statistics]
[:table#stats.helvetica.central-element [:table#stats.helvetica.central-element
(map (map
#(when (% stats) #(when-let [v (% stats)]
[:tr [:td (str (get-message %) ":")] [:td (% stats)]]) [:tr
[:td (str (get-message %) ":")]
[:td (if (or (= % :published) (= % :edited))
(str (java.util.Date. (Long/parseLong v))) v)]])
[:published :edited :publisher :views])])))) [:published :edited :publisher :views])]))))
(GET "/:year/:month/:day/:title/edit" [year month day title] (GET "/:year/:month/:day/:title/edit" [year month day title]

2
src/notehub/storage.clj

@ -24,7 +24,7 @@
~@body))) ~@body)))
(defn get-current-date [] (defn get-current-date []
(str (java.util.Date.))) (.getTime (java.util.Date.)))
(defn valid-publisher? [pid] (defn valid-publisher? [pid]
(= 1 (redis :hexists :publisher-key pid))) (= 1 (redis :hexists :publisher-key pid)))

Loading…
Cancel
Save