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

Timezone offset for glooko does not respect daylight savings time (DST) #10

Open
burnedikt opened this issue Jul 10, 2023 · 3 comments
Open

Comments

@burnedikt
Copy link

For glooko, a timezone offset needs to be configured in order for the records to correctly show up in nightscout.
However, in a lot of regions, the timezone offset changes by +/-1 hour depending on daylight savings time / summer time. As it is right now, the events will likely be wrongly offsetted when the switch from / to DST happens.

Potential improvement would be to allow specifying the actual target timezone (like Europe/Berlin) as a configurable environment variable instead of a fixed offset as to the best of my knowledge, NodeJS can automatically handle the different offset due to DST (if any) given a timezone name.

https://github.com/nightscout/nightscout-connect/blob/8f2ab374a288f8541b916d92cecfb55bb5f44889/lib/sources/glooko/index.js#L171C13-L171C13

@bewest
Copy link
Member

bewest commented Jul 10, 2023

Thanks! Sulka mentioned this as well, maybe we can pull the NS profile's timezone to avoid needing the extra env variable?

@burnedikt
Copy link
Author

Thanks! Sulka mentioned this as well, maybe we can pull the NS profile's timezone to avoid needing the extra env variable?

Sounds like a good idea to pull it from the profile (if any) 👍

@loopy321
Copy link

Having this issue too. I was using zone = moment.tz.zone('America/Chicago') in the glooko2nightscout-bridge variant, which was DST aware, FYI.

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

No branches or pull requests

3 participants