system.time() function

The system.time() function returns the current system time.

import "system"



import "system"

    |> set(key: "processed_at", value: string(v: system.time() ))

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.

Was this page helpful?

Thank you for your feedback!

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.