Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 542 Bytes

File metadata and controls

33 lines (25 loc) · 542 Bytes

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

echo null | zq -z 'yield now()' -

=>

2022-02-06T18:35:35.053843Z

(at the time this document was written)