Search code examples
clojureclj-time

Converting Instant Time into Joda Time in Clojure


I am stuck trying to convert an #inst "2016-08-15T14:00:00.000-00:00" into #object[org.joda.time.DateTime 0x1d4c2099 "2016-08-15T20:47:52.658Z"].

I am trying to do this in order to add (t/minutes duration) to my time/date!

Is there a way to convert the instant into joda time in clojure?


Solution

  • Perhaps (clj-time.coerce/to-date-time my-inst) will do the trick? the coerce namespace has a bunch of helpers for moving between types.