Skip to main content

getCurrentTime

Returns a datetime object for the current date and time.

The default timezone is GMT, but you can select another by using the optional parameter. All supported timezones are included in the parameter dropdown in the Function Builder.

Alternatively, you can specify a fixed offset from GMT.

Parameters

  • TIME ZONE (string)

    Optional. A string representing a regional timezone (e.g. Europe/Berlin). Alternatively, give a fixed offset in hours (e.g. +02:00).

    Default: GMT

Examples

Assume each call occurred on Dec 2, 2021 at 11:35:24 AM (GMT).

ATL in Script

Result

[[getCurrentTime()]]

Dec 2, 2021 11:35:24 AM

[[getCurrentTime('Africa/Cairo')]]

Dec 2, 2021 1:25:24 PM

[[getCurrentTime('America/New_York')]]

Dec 2, 2021 6:35:24 AM

[[getCurrentTime('Australia/Canberra')]]

Dec 2, 2021 10:35:24 AM

[[getCurrentTime('+01:00')]]

Dec 2, 2021 12:35:24 PM

[[getCurrentTime('-01:00')]]

Dec 2, 2021 10:35:24 PM

To reformat the returned object, use formatDateTime.

ATL in Script

Result

[[formatDateTime(getCurrentTime(), 'd@ MMMM yyyy')]]

2nd December 2021