Comments (9)
For reference this is the code:
current_time = Timex.now()
finish_time = Timex.add(current_time, Timex.Duration.from_hours(@summary.time_to_full_charge))
local_timezone = Timex.Timezone.local()
local_finish_time = Timex.Timezone.convert(finish_time, local_timezone)
formatted_finish_time = Timex.format!(local_finish_time, "%Y-%m-%d %H:%M:%S", :strftime)
The documentation for Timex.Timezone.Local says it will use the TZ variable by default.
I believe that Timex.Timezone.local()
is just a wrapper for Timex.Timezone.Local
.
https://github.com/bitwalker/timex/blob/main/lib/timezone/timezone.ex#L44-L60
All of these explains why it should work. It doesn't explain why it isn't working.
It could be that there is a bug in the Timex.Timezone.Local.localtz(:osx)
implementation. But it looks OK to me.
https://github.com/bitwalker/timex/blob/main/lib/timezone/local.ex#L74-L109
from teslamate.
All car trips etc are correct times, too.
That's a different story as grafana uses your browser's timezone.
from teslamate.
Yep that was it. I didn't know I had to run:
docker compose up -d
Thanks for all the help. Solved now!
from teslamate.
I'm not really sure what's going on. I'm getting help over on TMC as well, and it's a very bizarre thing. Still not any closer to figuring out why it's being finicky for me!
from teslamate.
Just to double-check: Your system time is correct?
from teslamate.
Yes, it's correct. All car trips etc are correct times, too.
from teslamate.
I see. Well, either way, correct system time. One thing that's peculiar that I can't figure out. I renamed the yml file and rebooted Docker, and TeslaMate still works. That would indicate that the yml I'm using is not the "right" one, yes? Well,
NAME STATUS CONFIG FILES
teslamate running(4) /Users/username/Documents/TeslaMate/docker-compose.yml
That's the only one I have, so.. I just don't get it. :(
from teslamate.
I renamed the yml file and rebooted Docker, and TeslaMate still works. That would indicate that the yml I'm using is not the "right" one, yes?
No, as soon as you deployed the docker compose stack you can potentially delete the yml file. Only when you want to change something, restart the containers etc. you need your compose specification.
from teslamate.
I renamed the yml file and rebooted Docker, and TeslaMate still works. That would indicate that the yml I'm using is not the "right" one, yes?
No, as soon as you deployed the docker compose stack you can potentially delete the yml file. Only when you want to change something, restart the containers etc. you need your compose specification.
I see. So is that why the TZ line change isn't doing anything? I added the line and restarted Docker, but that's apparently not enough.
from teslamate.
Related Issues (20)
- Intermittent charges incorrectly recorded HOT 15
- Impossible GPS coordinates HOT 1
- Suspend logging is not needed anymore as car falls asleep even while polling HOT 47
- Can't get the carId . already logging by the tesla token! HOT 2
- Release 1.28.3 seemingly not correctly pushed as arm64 image HOT 1
- WebView crashes while charging, if time_zone_not_found HOT 7
- Drive records are not saved HOT 4
- No connection to Tesla API / non-existing domain *done* HOT 3
- Trips with negative gradient do not record correctly HOT 8
- feat: bundle MQTT data in one json blob HOT 11
- New Model Y does not get discovered in version 1.28.3 HOT 1
- Model S MCU1 sleep issues HOT 19
- Battery Health - LFP - Status: 500. Message: convert frame from rows error: pq: division by zero HOT 4
- Has edge been updated? HOT 3
- TZ environment variable name confusion HOT 25
- Error on QNAP TS-231P3 HOT 1
- Extend version with more build info HOT 5
- Some address could not be displayed HOT 1
- Battery Health not showing on new cars? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teslamate.