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

getSystemTime() incorrect result due to tm_isdst not initialised #16

Closed
mattcro opened this issue Jun 11, 2023 · 1 comment · Fixed by #17
Closed

getSystemTime() incorrect result due to tm_isdst not initialised #16

mattcro opened this issue Jun 11, 2023 · 1 comment · Fixed by #17

Comments

@mattcro
Copy link

mattcro commented Jun 11, 2023

The getSystemTime() function uses mktime() to do the Iridium epoch offset, but does not set the tm struct's tm_isdst member, which may lead to incorrect time conversions (ie a random/junk DST offset).

It looks like the conversion code should either set epoch_start.tm_isdst = 0 or use mk_gmtime(&epoch_start) to get the epoch start timestamp.

@PaulZC
Copy link
Collaborator

PaulZC commented Jun 17, 2023

Hi @mattcro ,

Thanks for reporting this issue. I have corrected it in v3.0.6.

Very best wishes,
Paul

PaulZC added a commit that referenced this issue Jun 17, 2023
PaulZC added a commit that referenced this issue Jun 17, 2023
@PaulZC PaulZC linked a pull request Jun 17, 2023 that will close this issue
@PaulZC PaulZC closed this as completed Jun 17, 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 a pull request may close this issue.

2 participants