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/stm32l4/src | |
| parent | 6d35e3f63ca04e648a2ee33a1737f10704b388b3 (diff) | |
stm32/rtc: remove use of deprecated .timestamp()
Diffstat (limited to 'examples/stm32l4/src')
| -rw-r--r-- | examples/stm32l4/src/bin/rtc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32l4/src/bin/rtc.rs b/examples/stm32l4/src/bin/rtc.rs index a8a375ab4..f554f0f78 100644 --- a/examples/stm32l4/src/bin/rtc.rs +++ b/examples/stm32l4/src/bin/rtc.rs | |||
| @@ -40,7 +40,7 @@ async fn main(_spawner: Spawner) { | |||
| 40 | .unwrap(); | 40 | .unwrap(); |
| 41 | 41 | ||
| 42 | let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); | 42 | let mut rtc = Rtc::new(p.RTC, RtcConfig::default()); |
| 43 | info!("Got RTC! {:?}", now.timestamp()); | 43 | info!("Got RTC! {:?}", now.and_utc().timestamp()); |
| 44 | 44 | ||
| 45 | rtc.set_datetime(now.into()).expect("datetime not set"); | 45 | rtc.set_datetime(now.into()).expect("datetime not set"); |
| 46 | 46 | ||
| @@ -48,5 +48,5 @@ async fn main(_spawner: Spawner) { | |||
| 48 | Timer::after_millis(20000).await; | 48 | Timer::after_millis(20000).await; |
| 49 | 49 | ||
| 50 | let then: NaiveDateTime = rtc.now().unwrap().into(); | 50 | let then: NaiveDateTime = rtc.now().unwrap().into(); |
| 51 | info!("Got RTC! {:?}", then.timestamp()); | 51 | info!("Got RTC! {:?}", then.and_utc().timestamp()); |
| 52 | } | 52 | } |
