CSV download Time stamp from influxdb shows UTC time but display is on local

When I down load data from Influx by the CSV button the data has the UTC time stamp even though i have Local selected in influx. Is there a way to get the CSV timestamp to return local time?

@khorsey The local time option in the UI simply adjusts the displayed timestamps based on your current timezone. It doesn’t actually update the timestamps in the data. Flux itself doesn’t have “location” support yet, but you can use manually adjust timestamps with timeShift().

// Adjust timestamps for MDT timezone (my current tz)
data
  |> timeShift(duration: -6h)

Thanks Scott, does this need to go in a certain spot in the query?

Only if you’re doing things that depend on the timestamp (like windowing).

1 Like