Below is the The below code for getting gets datetime for the New Zealand timezone. For more info information on DateTime and available Timezones, please check the our API.
paste-code-macro | ||
---|---|---|
| ||
def todayDateTime = new DateTime() def nzTimeZone = api.getTimeZone("NZ") def todayText = todayDateTime.withZone(nzTimeZone).toString("yyyy-MM-dd") |