-
Notifications
You must be signed in to change notification settings - Fork 104
Wrong Leap Year Calculation #125
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
Comments
Hi @tim-scherer , Wow. Thanks for reporting this! That gremlin has been in there for a long time... But I guess only appeared on Tuesday... We'll fix this in the next release. Best wishes, |
|
The corrections are in the release_candidate branch if you would like to test them? Please see this commit for the changes. (I updated the examples too.) |
sparkfun/SparkFun_u-blox_GNSS_Arduino_Library#125 was reported and a correction was proposed.
Thanks a lot for the fast reply and the quick fix. Seems to work fine 👍 |
Confirmed working. Noticed the same 24h delta today. :) |
Hi @tim-scherer / @papillon81 , Thank you both. I will release v2.2.5 in a few minutes. Best wishes, |
Subject of the issue
Your workbench
SparkFun_u-blox_GNSS_Arduino_Library](https://github.com/sparkfun/SparkFun_u-blox_GNSS_Arduino_Library Library V2.2.0
Steps to reproduce
The error is located in the calculation perfomed in
SparkFun_u-blox_GNSS_Arduino_Library/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp
Line 16124 in 6eea877
and
SparkFun_u-blox_GNSS_Arduino_Library/src/SparkFun_u-blox_GNSS_Arduino_Library.h
Line 625 in 6eea877
Expected behavior
2022 is not a leap year
Actual behavior
DAYS_SINCE_MONTH[((uint32_t)packetUBXNAVPVT->data.year - 1970) & 3][(uint32_t)packetUBXNAVPVT->data.month] results as a leap year
The text was updated successfully, but these errors were encountered: