Search code examples
influxdbrfc3339

How to print epoch-formatted InfluxDB timestamps in RFC3339 format


I want to read my InfluxDB measurements in RFC3339 formatting via the CLI for debugging purposes, but since there is already an API that handles read/write operations, I don't want to mess with the actual format they are stored (Unix epoch nanoseconds).

If I issue "influx -precision rfc3339" as suggested here, will it also affect the format the timestamps are stored in the database, or just the format they are printed in the terminal? I only want the latter.


Solution

  • I just found the answer, in the official documentation:

    Note: Setting the precision to rfc3339 (-precision rfc3339) works with the -execute option, but it does not work with the -import option. All other precision formats (e.g., h,m,s,ms,u, and ns) work with the -execute and -import options.

    So it seems that even if I actively tried to import data with rfc3339 format, I wouldn't be able to. :)