Home / Companies / InfluxData / Blog / Post Details
Content Deep Dive

TL;DR InfluxDB Tech Tips – Flux Timestamps

Blog post from InfluxData

Post Details
Company
Date Published
Author
Nora Mullen
Word Count
644
Company Posts That Month
20
Language
English
Hacker News Points
-
Post removed?
No
Summary

In Flux, two timestamp formats are available: Unix timestamp and RFC3339 timestamp. The Unix timestamp format counts time since the Unix Epoch (1970-01-01T00:00:00Z UTC) in specified units such as nanoseconds, microseconds, milliseconds, seconds, etc. To convert timestamps from Unix nanoseconds to a human readable RFC3339 timestamp, use the `time()` function, and vice versa with `uint()`. Flux does not support mathematical operations using time type values, so to calculate duration between two timestamps, it is necessary to convert them to Unix nanosecond format first, then subtract one from another, and finally apply `duration()` function. The current time can be retrieved using the `now()` function in UTC or by importing the system package and `system.time()` function for RFC3339 format.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.