aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32l4/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32l4/src')
-rw-r--r--examples/stm32l4/src/bin/rtc.rs4
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}