clojure

Converting epoch time to human-readable date in Clojure


I have a Unix epoch time. How can I convert it to a human-readable date string? I have examined clj-time (https://github.com/clj-time/clj-time) but it appears to only go from readable-to-epoch. Thanks.


Solution

  • You can also use native calls:

    (str (java.util.Date. (System/currentTimeMillis)))
    ;; => "Mon Feb 29 21:59:51 MSK 2016"