today

today() 🡒 date, pure function

Returns the current wall-time date according to UTC.

show scalar "" with today()

The function is considered as a compile-time constant, hence, its results can be used to create a read pattern.

today(timezone: number) 🡒 date, pure function

Returns the current wall-time date with the time-zone passed as an argument and expressed as the difference in hours to UTC.

show scalar "" with today(-8) // UTC-8, Los Angeles

The function is considered as a compile-time constant, hence, if its argument is a compile-time constant as well, its results can be used to create a read pattern.

table T = extend.range(23)

T.Offset = T.N - 12

show table "Dates over timezones" a1b10 with
  T.Offset >= 0 ? "UTC+\{T.Offset}" : "UTC\{T.Offset}" as "UTC"
  today(T.Offset)

The above script gives the present date over varied timezones.