                                                episode-number)}))
         format-date (fn [row]
                       (assoc row :date
-                             (f/unparse date-formatter
-                                        (c/from-sql-date (:date row)))))]
+                             (format-as-local-date (:date row))))]
     (first (map format-date results))))
 
 (defn get-episode-tracks

                           (kc/order :number :DESC))
        format-date (fn [row]
                      (assoc row :date
                             (f/unparse date-formatter
                                        (c/from-sql-date (:date row)))))]
    (map format-date results)))

(defn get-episode-basic-data

         {:status "error"
          :cause "general-error"})))))

(defn format-as-local-date
  "Format a date from the database as a local date. This avoids problems
  with timezones."
  [db-date]
  (binding [l/*local-formatters* {:local
                                  (DateTimeFormat/forPattern "d.M.y")}]
    (l/format-local-time (l/to-local-date-time db-date) :local)))

(defn get-episodes
  "Returns all the episodes in the database. Returns episode number, name
  date."
