Closed
Description
Subject of the issue
setTime method adds an offset in the week of day computation.
Your workbench
- What platform are you using? RedBoard Artemis Nano
- What version of the device are you using? Is there a firmware version?
- How is the device wired to your platform?
- How is everything being powered? through USB
- Are there any additional details that may help us help you?
Steps to reproduce
Tell us how to reproduce this issue. Please post stripped down example code demonstrating your issue to a gist.
call setTime( 20, 36, 0, 0, 11, 11, 2019) should compute monday.
Expected behaviour
Tell us what should happen
Month parameter in function should be 1-12 to compute day of the week.
Actual behaviour
Tell us what happens instead
Month value is reduced by 1, day computation is wrong.
Solution
hal_time.ui32Weekday = am_util_time_computeDayofWeek(2000 + year, month + 0, dayOfMonth); // Error month + 0 instead of month + 1 - JLC 11/11/2019
Metadata
Metadata
Assignees
Labels
No labels