Rollup merge of #93495 - solid-rs:fix-kmc-solid-rtc-month, r=yaahc
kmc-solid: Fix off-by-one error in `SystemTime::now` Fixes a miscalculation of `SystemTime` on the [`*-kmc-solid_*`](https://doc.rust-lang.org/nightly/rustc/platform-support/kmc-solid.html) Tier 3 targets. Unlike the identically-named libc counterpart `tm::tm_mon`, `SOLID_RTC_TIME::tm_mon` contains a 1-based month number.
This commit is contained in:
commit
af2886eef9
@ -21,7 +21,7 @@ impl SystemTime {
|
||||
tm_min: rtc.tm_min,
|
||||
tm_hour: rtc.tm_hour,
|
||||
tm_mday: rtc.tm_mday,
|
||||
tm_mon: rtc.tm_mon,
|
||||
tm_mon: rtc.tm_mon - 1,
|
||||
tm_year: rtc.tm_year,
|
||||
tm_wday: rtc.tm_wday,
|
||||
tm_yday: 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user