Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the inLocalTimeZone parameter to the prepareResponse function. #338

Merged
merged 11 commits into from
Nov 14, 2023

Conversation

gearnshaw
Copy link
Contributor

This defaults to false (existing behaviour) so is backwards compatible.

When inLocalTimeZone = false, dates are returned in the format: "endDate":"2022-12-22T16:51:30.000Z" When inLocalTimeZone = true, dates are returned in the format: "endDate":"2022-12-22T11:51:30.000-0500"

This allows performance improvements, because you don't have to perform further date processing on the values to convert them back into the local time zone.

This PR adds the flag as a parameter to getSleepSamples. It can easily be added to other functions as required.

…This defaults to false (existing behaviour) so is backwards compatible.

When inLocalTimeZone = false, dates are returned in the format: "endDate":"2022-12-22T16:51:30.000Z"
When inLocalTimeZone = true, dates are returned in the format: "endDate":"2022-12-22T11:51:30.000-0500"

This allows performance improvements, because you don't have to perform further date processing on the values to convert them back into the local time zone.

This PR adds the flag as a parameter to getSleepSamples. It can easily be added to other functions as required.
@aboveyunhai aboveyunhai self-requested a review August 23, 2023 18:45
@StasDoskalenko StasDoskalenko merged commit 056530f into StasDoskalenko:master Nov 14, 2023
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.

2 participants