LiamMorrow / LiftLog

A cross platform app for tracking your lifts in the gym
https://liftlog.online
GNU Affero General Public License v3.0
64 stars 8 forks source link

Sessions & Bodyweight in Statistics dates are off by one #283

Closed Sveske-Juice closed 2 weeks ago

Sveske-Juice commented 2 weeks ago

I have two Workout sessions, where i log my bodyweight. 1st sessions i oct. 5 @ 80kg bw & 2nd session is oct. 6 @ 78.5kg bw.

The Bodyweight graph (StatGraphCardContent) shows the day is off by one. At oct. 4 it shows 80kg and on oct. 5 it shows 78.5kg. So they are 1 day early. Screenshot_20241006-173702_LiftLog

The Sessions graph also is off by one (1 day early).

The issue does not appear on the graph from the UnpinnedExercisesToShow, only the Bodyweight and Sessions graphs.

I tried exporting the data to see if the dates are stored wrong, but I couldn't find the bodyweight data in the exported data (and didn't know how to properly de-serialze it either way, which could probably be seen if #244 is implemented).

Some debug information: Timezone: Europe/Copenhagen or UTC+2 LiftLog version: 2.18.3 Android version: 14 kernel: 5.4.280

Sveske-Juice commented 2 weeks ago

Another bug that is probably not related to this one: When registering a freeform workout without any exercises other than a body weight, then the body weight data is not included in the Body weight graph.

I did this because before installing this app, i registered my body weight in my notes, but thought i should move them to the app as a freeform workout with just the body weight registered. A workaround is to add a dummy exercise to the freeform workout, but it would be nice if this wasn't required. This should probably be opened in a separate issue.

LiamMorrow commented 2 weeks ago

Thanks for the report! I've tried to avoid timezone issues by only working with LocalDate/LocalTimes without timezone info, but obviously the charts did not get the memo and are treating them as UTC. I've crafted a fix and I should be able to push out a release in the next couple days

Sveske-Juice commented 2 weeks ago

Great, that's awesome!