Skip to content

Instantly share code, notes, and snippets.

@noisesmith
Forked from martinklepsch/handler.clj
Created August 30, 2014 14:48
Show Gist options
  • Save noisesmith/4acb1bfaaf49733caf05 to your computer and use it in GitHub Desktop.
Save noisesmith/4acb1bfaaf49733caf05 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