now
Table of Contents
Function
now — the current time
Synopsis
now() -> time
Description
The now function takes no arguments and returns the current UTC time as a value of type time
.
This is useful to timestamp events in a data pipeline, e.g., when generating errors that are marked with their time of occurrence:
switch (
...
default => yield error({ts:now(), ...})
)
Examples
super -z -c 'yield now()'
=>
2025-01-24T16:57:20.555988Z
(at the time this document was last updated)