-
Notifications
You must be signed in to change notification settings - Fork 882
fix: set $__timezone explicitly in dashboards to ensure truncation is done with respect to the Grafana timezone #4684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for teslamate ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
on it |
|
Number of drives is different as well |
|
yes, drives happening over night have been missing so far - current number should be correct. can you compare with drives dashboard? |
|
Syntax Error is fixed, ty!
Nope, drives dashboard shows 122 rows for last 6 months which seems to be right v1.33.0 drive stats dashboard shows same number but #4684 does show 137 No overnight drives as of my knowledge |
|
Okay, will have a look... |
|
Let's collect it here... Charging Stats for my edge case looks good. I don't have drives between 00:00 and 01:00... Perhaps @giterdone509 can also test it. He is 4 hours off UTC... |
|
@JakobLichterfeld do you have any incomplete drives? drives dashboard and stat are identical looking at my data 🤔 |
Yeah but not in this timeframe as of my knowledge, that's why I choose the 6 month period |
|
ok, should those be ex or included? |
|
@DrMichael - thanks checking this! fixed all places where making use of to_char! |
My pleasure. Thanks for your work... |
82eb1c7 to
e53646e
Compare
e53646e to
629fd38
Compare
629fd38 to
cbe91cd
Compare
A drive is a drive, innit? So in my case it is one drive which was split in 15 due to whatever reason. |
|
Ready to be merged |
Sorry, during my run in the woods I changed my mind. We do handle unclosed drives and charges as corrupt in other places, aren't we? So they should not be included and you are right. |
|
ok, done ;) |
JakobLichterfeld
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully tested. Ty!
And sorry for the back and forth



Grafana is not setting the PostgreSQL session timezone. To ensure truncation is done with respect to the Grafana timezone setting set the optional time_zone argument for
DATE_TRUNC().Fixes #4675