Skip to content

Fix getLocalTimestamp#82

Open
CuberL wants to merge 1 commit intoPythe1337N:masterfrom
CuberL:fix-get-local-timestamp
Open

Fix getLocalTimestamp#82
CuberL wants to merge 1 commit intoPythe1337N:masterfrom
CuberL:fix-get-local-timestamp

Conversation

@CuberL
Copy link

@CuberL CuberL commented Dec 10, 2024

Hi, I noticed that the implementation of the getLocalTimestamp method used in updateWeight seems problematic. As I understand it, this method is intended to generate an ISO format event string for a specified timezone. Taking America/Los_Angeles (GMT-8) as an example, for the UTC time 2024-12-10T18:00:00.000Z, the expected result should be 2024-12-10T10:00:00.000. However, the method currently returns 2024-12-09T18:00:00.000. As a result, the recorded date in Garmin Connect is December 9th, and the time is incorrect.

To address this, I have reimplemented the method. For the same case, the result will now be 2024-12-10T10:00:00.000.

The sv language was chosen because Swedish uses ISO strings as its time representation format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant