Versions Compared

Key

  • 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
languagegroovy
def todayDateTime = new DateTime()
def nzTimeZone = api.getTimeZone("NZ")
def todayText = todayDateTime.withZone(nzTimeZone).toString("yyyy-MM-dd")