luminus

yogthos 2019-04-21T14:03:54.009500Z

You could do this:

(defn offset [dt]
  (-> (java.time.ZoneId/systemDefault)
      (.getRules)
      (.getOffset dt)))

(defn to-date [dt]
  (-> dt
      (.toInstant (offset dt))
      (java.util.Date/from)))

(to-date (java.time.LocalDateTime/now))
However, Date is more or less deprecated now, using either local or zoned time is generally recommended

👍 2