We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 511c260 commit b7fc575Copy full SHA for b7fc575
src/rtc.rs
@@ -866,6 +866,7 @@ impl embedded_sdmmc::TimeSource for Rtc {
866
impl fatfs::TimeProvider for Rtc {
867
fn get_current_date(&self) -> fatfs::Date {
868
let (year, month, day) = self.date_raw();
869
+ let year = (year + 1970).max(1980).min(2107);
870
871
fatfs::Date::new(year.into(), month.into(), day.into())
872
}
@@ -874,6 +875,7 @@ impl fatfs::TimeProvider for Rtc {
874
875
let (hour, minute, second) = self.time_raw();
876
let micro = self.microsecond_raw();
877
878
879
880
let time = fatfs::Time::new(
881
hour.into(),
0 commit comments