diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-03-06 19:45:57 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-03-06 19:45:57 +0100 |
| commit | f3efa4ee3ba562fd51cd49b70a6c5305a1aaac6a (patch) | |
| tree | eed11942c52743f34718bab206c095344b5aefec /examples/stm32h7/src | |
| parent | 6d35e3f63ca04e648a2ee33a1737f10704b388b3 (diff) | |
stm32/rtc: remove use of deprecated .timestamp()
Diffstat (limited to 'examples/stm32h7/src')
| -rw-r--r-- | examples/stm32h7/src/bin/rtc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32h7/src/bin/rtc.rs b/examples/stm32h7/src/bin/rtc.rs index c6b9cf57e..0adb48877 100644 --- a/examples/stm32h7/src/bin/rtc.rs +++ b/examples/stm32h7/src/bin/rtc.rs | |||
| @@ -24,7 +24,7 @@ async fn main(_spawner: Spawner) { | |||
| 24 | .unwrap(); | 24 | .unwrap(); |
| 25 | 25 | ||
| 26 | let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); | 26 | let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); |
| 27 | info!("Got RTC! {:?}", now.timestamp()); | 27 | info!("Got RTC! {:?}", now.and_utc().timestamp()); |
| 28 | 28 | ||
| 29 | rtc.set_datetime(now.into()).expect("datetime not set"); | 29 | rtc.set_datetime(now.into()).expect("datetime not set"); |
| 30 | 30 | ||
| @@ -32,5 +32,5 @@ async fn main(_spawner: Spawner) { | |||
| 32 | Timer::after_millis(20000).await; | 32 | Timer::after_millis(20000).await; |
| 33 | 33 | ||
| 34 | let then: NaiveDateTime = rtc.now().unwrap().into(); | 34 | let then: NaiveDateTime = rtc.now().unwrap().into(); |
| 35 | info!("Got RTC! {:?}", then.timestamp()); | 35 | info!("Got RTC! {:?}", then.and_utc().timestamp()); |
| 36 | } | 36 | } |
