Deepika_Lalam
5 years agoRegular Visitor
Add minutes to current date time using groovy
To get the Current Date Time value, im using this: ${= Calendar.getInstance(TimeZone.getTimeZone('GMT')).format("yyyy-MM-dd'T'HH:mm:ss")} which gives DateTime as 2020-02-05T22:07:34 I want to a...
- 5 years ago
With Java 8, below should get you the time you needed in one liner
${= java.time.ZonedDateTime.now(java.time.ZoneId.of("GMT")).plusMinutes(40).format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))}