1.2 KiB
1.2 KiB
title | description | aliases | menu | weight | flux/v0.x/tags | related | introduced | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
system.time() function | The `system.time()` function returns the current system time. |
|
|
401 |
|
|
0.18.0 |
The system.time()
function returns the current system time.
import "system"
system.time()
Examples
import "system"
data
|> set(key: "processed_at", value: string(v: system.time() ))
{{% note %}}
system.time() vs now()
system.time()
returns the system time (UTC) at which system.time()
is executed.
Each instance of system.time()
in a Flux script returns a unique value.
now()
returns the current system time (UTC).
now()
is cached at runtime, so all instances of now()
in a Flux script
return the same value.
{{% /note %}}