Skip to content

RTC.cpp error line 62 #87

Closed
Closed
@JLC333-Github

Description

@JLC333-Github

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions