Skip to content

Instantly share code, notes, and snippets.

@martinklepsch
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save martinklepsch/3bec2f54456a2bcd274b to your computer and use it in GitHub Desktop.
Save martinklepsch/3bec2f54456a2bcd274b to your computer and use it in GitHub Desktop.
(defn now-plus [n]
"Returns current time plus `n` minutes as string"
(let [f (SimpleDateFormat. "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")]
(.setTimeZone f (TimeZone/getTimeZone "GMT" ))
(.format f (Date. (+ (System/currentTimeMillis) (* n 60 1000))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment