Skip to content

Commit

Permalink
Merge pull request #177 from pimoroni/patch-rv3028
Browse files Browse the repository at this point in the history
Fix RTC year argument for #176
  • Loading branch information
Gadgetoid committed Jul 8, 2021
2 parents e277bf1 + b4c0d78 commit 141a967
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions micropython/modules/breakout_rtc/breakout_rtc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ mp_obj_t BreakoutRTC_set_time(size_t n_args, const mp_obj_t *pos_args, mp_map_t
mp_raise_ValueError("date out of range. Expected 1 to 31");
else if(month < 1 || month > 12)
mp_raise_ValueError("month out of range. Expected 1 to 12");
else if(year < 0 || year > 99)
mp_raise_ValueError("year out of range. Expected 0 to 99");
else if(year < 2000 || year > 2099)
mp_raise_ValueError("year out of range. Expected 2000 to 2099");
else
return mp_obj_new_bool(self->breakout->set_time(sec, min, hour, weekday, date, month, year));

Expand Down

0 comments on commit 141a967

Please sign in to comment.