# Data showing incorrect timezone in Explorer

**URL:** <https://community.influxdata.com/t/data-showing-incorrect-timezone-in-explorer/17999>\
**Category:** Telegraf\
**Tags:** influxdb\
**Created:** [January 24, 2021, 2:21am UTC](https://community.influxdata.com/t/data-showing-incorrect-timezone-in-explorer/17999 "2021-01-24T02:21:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanx](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@Sanx](https://community.influxdata.com/u/Sanx)\
**Post date:** [January 24, 2021, 2:21am UTC](https://community.influxdata.com/t/data-showing-incorrect-timezone-in-explorer/17999/1 "2021-01-24T02:21:44Z")

</div>

Hi,

I’m pushing data into InfluxDB using the API **/write** endpoint. My script is reading timestamps from some Zigbee temperature sensors via a Hubitat hub. The timestamp data is presented as a yyyy-MM-ddThh:mm:ssz string, for instance:  
“2021-01-24T01:19:43+0000”

This value is then being parsed by the script and converted into UNIX Epoch time:  
PowerShell:  
`$timestamp = [System.DateTimeOffset]::Parse($date).ToUnixTimeSeconds`  
Python:  
`timestamp = datetime.datetime.strptime(date, "%Y-%m-%dT%H:%M:%S%z").strftime("%s")`

When run against the sample timestamp included above, both the PowerShell and Python methods return **1611451183**. However, when looking at the data in Explorer in raw view, all the timestamps are shown with a -10 hour offset; in this example: 2021-01-23T15:19:34.000Z

The ten hour offset is not random: I’m in Brisbane, Australia, which is UTC+10. Influx appears to be treating the time sent through as local time, and then removing the UTC offset again.

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [January 25, 2021, 8:26pm UTC](https://community.influxdata.com/t/data-showing-incorrect-timezone-in-explorer/17999/2 "2021-01-25T20:26:16Z")

</div>

Hello @Sanx ,  
I’m not sure have you looked at this configuration option?

> **[Control an InfluxDB dashboard | InfluxDB Cloud Documentation](https://docs.influxdata.com/influxdb/cloud/visualize-data/dashboards/control-dashboard/#select-timezone)**
>
> Control an InfluxDB dashboard in the InfluxDB user interface (UI).

---

<div class="post-metadata">

**Author:** ![Sanx](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@Sanx](https://community.influxdata.com/u/Sanx)\
**Post date:** [January 27, 2021, 8:27am UTC](https://community.influxdata.com/t/data-showing-incorrect-timezone-in-explorer/17999/3 "2021-01-27T08:27:47Z")

</div>

Hi @Anaisdg  
I eventually tracked down the problem to (surprise surprise) a bug in my code. Turns out the Python `.strftime("%s")` function is not timezone aware. It was therefore treating the UTC time it was being passed as local time (for me - UTC+10) when calculating Epoch time.

No bugs in Influx; just this idiot not being able to read documentation properly.

Thanks

Dan.

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [January 27, 2021, 3:40pm UTC](https://community.influxdata.com/t/data-showing-incorrect-timezone-in-explorer/17999/4 "2021-01-27T15:40:34Z")

</div>

Hey @Sanx,  
Happy it’s solved. Lol now don’t go stealing one of my signature moves 😛
