Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

The below code for gets datetime for the New Zealand timezone. For more information on DateTime and available Timezones, please check our API.

Paste code macro
def todayDateTime = new DateTime()
def nzTimeZone = api.getTimeZone("NZ")
def todayText = todayDateTime.withZone(nzTimeZone).toString("yyyy-MM-dd")