Download CSV Timestamps should be in local time, not UTC #20610
Replies: 5 comments
-
I believe this is expected as the timestamps are in UTC (implied by the So what is April 1 at midnight in your time zone is March 31 at 22:00 in UTC. |
Beta Was this translation helpful? Give feedback.
-
well that implies that all who use HA need to know a lot about scripting and time tones etc. Peronally I didn't know tha about z at the end. What is expected behaviour here would be, what I see in Energy UI and how its declared there, to see same data in CSV file, now that is not a case |
Beta Was this translation helpful? Give feedback.
-
I don't necessarily disagree with you, but it was mandated during review of this feature that all downloaded times should be printed in UTC, I guess that is a common practice. So this is working as intended. |
Beta Was this translation helpful? Give feedback.
-
OK, lets put it this way, I started using HA about 3-4 months ago, and slowly building my setup, now I came accross energy panel and I can tell you that is totally unusable in the way that is presented in UI right now. But since it collects data from my sensors, I expected to be able to use that data in some external program for analysis. So I saw that has a download log option, and I liked that. After reading this what you wrote, personally I can't understand that decision or request that all times should be exported as UTC, since not all HA work in that time zone. HA clearly has support for local time since I can see logs and events in UI inside HA based on my local time. But for some strange reason exported data is in UTC time? So now I need to find someone to write me a plugin or script that will convet that UTC time to my local time and that I can finally have exported data matching what I already see in HA user interface, really strange decision and basically renders HA export data unusable for 50-60 % of users who will not go in that dirrection to write (or can't) that piece of code for conversion. So HA can keep all data as it probably does in UTC, but if I as a user request to download some data, I expect it to match to already shown to me as user in UI of HA. Otherwise I can't trust even what I see in UI if there is a difference and I will revert to other solution, got my point? |
Beta Was this translation helpful? Give feedback.
-
Moved to discussions w/ updated title as it's more appropriate there. |
Beta Was this translation helpful? Give feedback.
-
Checklist
Describe the issue you are experiencing
Download data in CSV format gives offset in header compared to Energy UI. This happens to all ranges of date selection.
Example CSV data for period April 01 - April 21:
Example Energy UI for the same period:
Describe the behavior you expected
I expected to see in CSV that colomn D will be marked as "2024-04-01T00:00:00.000Z" to represent 1st day of April
It is exported as "2024-03-31T22:00:00.000Z" data in this colomn D relates to Energy UI for april 1st
If range is day, why we have in header time stamp that starts at 22:00:00... time?
Same happens if you export for a single day, offset is there, data corresponds to Energy UI, but in CSV is labeled wrong
Steps to reproduce the issue
...
What version of Home Assistant Core has the issue?
2024.4.3
What was the last working version of Home Assistant Core?
No response
In which browser are you experiencing the issue with?
Chrome, Edge
Which operating system are you using to run this browser?
Win 10 64-bit
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
No response
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions