commit ce07a90dc563f88e847ac3aae9de323b3d7255f7 from: Omar Polo date: Tue Dec 01 17:44:19 2020 UTC [gemini] feed: fix date formatting commit - 441c3bcdcc1b984c1f0edfb3c74a441573dd3d88 commit + ce07a90dc563f88e847ac3aae9de323b3d7255f7 blob - e5628966368b1b9755ef2c6480b4a06e90c167b7 blob + 565f9f5c5edd9032cb818be4c0d324d75f4dc32c --- src/blog/gemini.clj +++ src/blog/gemini.clj @@ -12,7 +12,7 @@ (for [post posts] (let [{:keys [title date slug]} post url (str "gemini://gemini.omarpolo.com/post/" slug ".gmi")] - [:link url (str (time/fmt-iso8601 date) " " title)]))))) + [:link url (str (time/fmt-iso8601 date) " - " title)]))))) (defn with-page [_ & body] (gemtext/unparse blob - 428495b3be602bd744157d2438495a5cf5635bf7 blob + 772af3406fdef144c89b7d026a295c059a735a4e --- src/blog/time.clj +++ src/blog/time.clj @@ -23,10 +23,7 @@ " 00:00:00 GMT"))) (defn fmt-iso8601 [d] - ;; quoted to indicate UTC, not TZ offset. Also, HH:mm is 00:00 - ;; because i'm parsing the raw date as LocalDate and not datetime, - ;; so there isn't the info about the hour and the minute. - (let [pattern (DateTimeFormatter/ofPattern "yyyy-MM-dd'T'00:00'Z'")] + (let [pattern (DateTimeFormatter/ofPattern "yyyy-MM-dd")] (.format d pattern))) (defn parse [s]