stm32/rtc: remove use of deprecated .timestamp()
This commit is contained in:
@@ -40,7 +40,7 @@ async fn main(_spawner: Spawner) {
|
||||
.unwrap();
|
||||
|
||||
let mut rtc = Rtc::new(p.RTC, RtcConfig::default());
|
||||
info!("Got RTC! {:?}", now.timestamp());
|
||||
info!("Got RTC! {:?}", now.and_utc().timestamp());
|
||||
|
||||
rtc.set_datetime(now.into()).expect("datetime not set");
|
||||
|
||||
@@ -48,5 +48,5 @@ async fn main(_spawner: Spawner) {
|
||||
Timer::after_millis(20000).await;
|
||||
|
||||
let then: NaiveDateTime = rtc.now().unwrap().into();
|
||||
info!("Got RTC! {:?}", then.timestamp());
|
||||
info!("Got RTC! {:?}", then.and_utc().timestamp());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user