cyberjunky / python-garminconnect

Python 3 API wrapper for Garmin Connect to get activity statistics
MIT License
965 stars 151 forks source link

set_blood_pressure uses incorrect datetime substring #188

Closed kerryshireman closed 8 months ago

kerryshireman commented 10 months ago

https://github.com/cyberjunky/python-garminconnect/blob/4e4e58fb79623baaf2cb72828170946004d53283/garminconnect/__init__.py#L436

The [:22] substring used in the set_blood_pressure method should, based on my tests, instead be [:19].

Otherwise, the value for measurementTimestampGMT ends up being formatted like 2024-01-23T12:44:13+00.00. The +00. causes the POST operation to fail.

kerryshireman commented 10 months ago

I have a local branch with this quick fix, but I can't push to this repo.

ERROR: Permission to cyberjunky/python-garminconnect.git denied to kerryshireman.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
cyberjunky commented 10 months ago

Normaly you need to update your github fork and click "open PR" But I can apply patch, thanks!

cyberjunky commented 10 months ago

Thank you, it started out of my own interest, and it's good to see other people using it. Sometimes a struggle to find some time to code ;-)

If case you didn't know, you can simply edit 'my code file' in github.com and it will fork to your github.com and create a patch branch to be pushed as PR...

cyberjunky commented 10 months ago

If you want and have it public share some info on your project, I can highlight some on here, there are some remarkable ones, but always forget too log them somewhere.

kerryshireman commented 10 months ago

I always forget about the web editing tools! I need to bust out of my IDE sometimes.

My project is just this dirty set of scripts for collecting data and pushing it into G-Sheets. Nothing spectacular, just some glue. Definitely not worthy of note!

cyberjunky commented 8 months ago

Closing, since resolved, thank you!