docs-v2/content/v2.0/reference/flux/stdlib/built-in/misc/now.md

986 B

title description aliases menu weight related
now() function The `now()` function returns the current time (UTC).
/v2.0/reference/flux/functions/built-in/misc/now/
v2_0_ref
name parent
now built-in-misc
401
/v2.0/reference/flux/stdlib/system/time/

The now() function returns the current time (UTC).

Function type: Date/Time
Output data type: Time

now()

Examples

data
  |> range(start: -10h, stop: now())

{{% note %}}

now() vs system.time()

now() returns the current UTC time. now() is cached at runtime, so all instances of now() in a Flux script return the same value.

system.time() returns the current system time of the host machine, which typically accounts for the local time zone. This time represents the time at which system.time() it is executed, so each instance of system.time() in a Flux script returns a unique value. {{% /note %}}