Time offset (-1)
Closed this issue ยท 27 comments
Hello again,
I just find out there's one hour offset on activities once fetched from endurain from both garmin & strava
Here screnshots from my today's activity at 15.21:
Both garmin & strava are ok on endurain there's one hour less โ
just to let you know ๐ checked both container & system clock, OK there.
ps. crowdin catalan translation @ 100% ๐
Hi. Thanks for the info. I am storing the dates in UTC and that is not being converted to local time in the frontend. Should be an easy fix.
Keep you posted
Can you please check if in version dev_25112024 the issue is fixed?
This version has DB changes, please backup your DB before applying it.
il definitely check but il get late home today, i will check it by tomorrow!
do I need to register a new activity or will be reflected on previous stored activities?
Thanks so much!
This should reflect on existing activities.
sorry for the delay, had a crazy day...
tried with image version dev_25112024 and issue still not fixed. three different browsers, still one hour behind.
just a question: if I get back to 'normal' image (not dev_) should I restore db or its ok to stay with this one?
TX
Deleting initial_kms column from gear table should be enough to go back.
Regarding the issue, just discovered the problem. Despite the store logic on the DB being correct, the database column type is DateTime and not Timestamp. DateTime does not keep the TZ info, so it stores in UTC and returns in UTC despite your time being CET.
do i need to change something or will u release a new image with correction?
if i do not change anything on db can i cahnge to any other image version?
You can stay on that version and upgrade to a new one when it comes out. To change to a prior one, i.e., latest stable, you need to drop the column I stated.
I will need to release a fix in a later version for this.
lovely. thanks so much mate.
safe to stay on dev version tho?
or better to rollback to latest stable?
on this dev version garmin connect does not update activities...
tried to roll back but endurain_backend does not start at all...are u aware of this?
Please refer to this issue.
alright; time to wait then.
Thanks
Hello again. To go back to previous version you also need to change alembic version on the DB.
So to go from dev to v0.6.4:
- Drop column initial_kms from gear table in the DB;
- Change alembic version in the DB from 7ba9b71fe203 to 65a0f1d72997
If that does not work please tell me
Ok for dropping the column in database but for changing alembic version is something I need to change from phpmyadmin or should I connect to mariadb container & execute some instruction from there?
Using phpmyadmin go to the alembic table and change the value.
Do you mind sharing with me a .fit file with Spain TZ so I can do some tests? You can send it to joao@endurain.com
Thanks
ok will do.
tx again.
il revert back endurain to stable release
ps. issue with python gc got fixed...
with modifications u state rolled back to latest stable with no issues at all
will stay at stable version for now & hope to get garmin connect back in next endurain's update!
sent u the file, hope u find it useful ๐
Hi @rubenixnagios I have a new dev version "dev_10122024" that fixes this (I hope :)). Can I ask you to test it?
This version has DB changes, please backup your DB before applying it.
You will also need to add a new env variable to the backend:
- TZ=Europe/Madrid
Hello and thanks for your efforts,
Started fresh with new folders, new db and everything with this dev versions and cannot start container:
sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (2005, "Unknown server host 'mariadb' (-2)")
(Background on this error at: https://sqlalche.me/e/20/e3q8)
ERROR: Application startup failed. Exiting.
Backend startup event - v0.6.5
same docker-compose file, just changing folders....
ok my mistake, got it working but time still shows -1 hour
Thanks for the feedback. In the logs migration number 2 happens successfully?
In the database in the activities table is there a new timezone column? If yes, can you check if all activities have a timezone defined?
Thanks for the feedback. In the logs migration number 2 happens successfully?
In the database in the activities table is there a new timezone column? If yes, can you check if all activities have a timezone defined?
hello, just checked db from phpmyadmin
column in activities table exists
as i started fresh I just imported last days activities and can confirm all activities have tz defined:
Yes, still shows wrong TZ.
On three different browsers get same exact result...
Using the file that you sent me, can you attach some screenshots of what is in the DB, what shows in the frontend and what should be the correct value?
Thank you
ok will have to do some changes as I just started fresh with this new dev version and just imported some last days garmin activities....will need to recover the email and load that file on endurain's new db...
will do and will post the result in here; thanks again!!
Hello. This should be fixed in v0.6.5. I will close the issue, but if the issue persists please feel free to open it again.
Thank you.