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
TZ environment variable name confusion #3678
Comments
@TSJasonH please share your docker-compose file (without your secrets). The name of the environment variable is |
sure...
|
Random thought: I would like to be able to see the current timezone that is in use when the car is not charging. Maybe something to print the last refresh date/time in the live view or something like that would be a good idea. This probably would help debug this issue as well. |
Been using TM_TZ in the .env file since 2019. Both TeslaMate and Grafana reported the correct time since. Here the instruction for the .env file does mention TM_TZ: All i did was change the zone and kept the same variable to fix the issue. |
Note the referenced instructions set So doing in this way makes sense. TeslaMate is reading the But there is nothing in TeslaMate - that I am aware of - that reads the The docker-compose file quoted above does not have the |
Just to add another data point, my .yml file has the following: Nothing about TM_TZ in the file at all. I'm not having a problem; time is being displayed correctly in both the Teslamate page and Grafana pages. I don't know if this information helps or hurts... I'm running the container locally in a Photon VM on an ESX host. |
For what it is worth, a user on TMC changed the variable from |
That does make sense. If |
Even if it is not related to the issue here, you need to update your postgres database container, please do a backup and follow https://docs.teslamate.org/docs/maintenance/upgrading_postgres |
The issue are the |
Looks good. Quotes...who knew :-/ Also thanks for the db upgrade tip. Completed the upgrade to pg 15 smoothly with the provided instructions. |
So issue is resolved with only |
The issue was fixed when I replaced to TZ by TM_TZ. As mentioned by @cwanja Now the web page is coming up while charging (no more 500 server error), but the time is 5.5 hours off. Although my TZ is set to America/Toronto? Grafana info is spot on about drive time and charge time, it is not just not showing up right on the Teslamate homepage.(+5,5 hours), As an example, at an expected local 8h15 finish time, it was showing 13h45. I’m not worried much, just want to report here. |
I think it might help if the time displayed the timezone offset, that would help verify that the timezone is correct. |
was getting internal server errors, tried TM_TZ and it still didnt fix it. Rolled back to teslamate/teslamate:1.28.2 and its working fine again with just the TZ env |
If you ask for help, please share your docker-compose (without credentials) |
I kind of think we need to be able display configuration errors - such as invalid TZ - somewhere on the website. Which in turn means the website shouldn't crash if it is invalid, but maybe resort to some sort of fallback behaviour. The idea of looking at the logs - is a sensible one - but I think our users who are not programmers can struggle with this. So maybe we need to try to simplify the errors as much as possible and make them accessible by putting them on the website, where everyone can see them without needing to learn about logs. It doesn't help when the invalid TZ only error only happens when the car is charging either. Perhaps we should be trying to load the timezone at startup. |
Total agree. Not only valid for TZ |
This is the docker-compose i used a couple years ago initially, but have been using watchtower to update the stack
|
Just pulled a pulled some "updated" version of 1.2.8.3 (Teslamate and Database have been downloaded) and now the time to finish is accordingly to my TZ ! All is good now! |
This needs to be
Even if it is not related to the issue here, you need to update your postgres database container, please do a backup and follow https://docs.teslamate.org/docs/maintenance/upgrading_postgres |
Thanks, I did spot that and had updated my container, but it did still get the internal server error. I'll try updating again and trying again -also will try updating postgres |
I installed teslamate for the first time last week and followed the docker installation guide and using the example docker-compose.yml. I was having issues with the timestamps for my drives being hours off so I added the TZ variable into the compose and updated. Now my drives are the correct time. The TZ setting should be added to the installation docs. |
Where were your timestaps off? Grafana use your local browser settings for displaying. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Originally posted by @TSJasonH in #3651 (comment)
The text was updated successfully, but these errors were encountered: