Skip to main content
hochul yoo
Associate III
August 26, 2022
Solved

STM32MP1) How to set the date and keep it ?

  • August 26, 2022
  • 1 reply
  • 1612 views

Hello all ~

​I have STM32MP157A-EV1 and STM32MP157C-DK2. 

I want to change system time and keep it. 

But It is not working well. 

Below is the test log on EV1.

root@stm32mp1:~# date -s "20031025 18:00:00"
Sat Oct 25 18:00:00 UTC 2003
root@stm32mp1:~# date
Sat Oct 25 18:00:03 UTC 2003
root@stm32mp1:~#
root@stm32mp1:~# hwclock --systohc --utc
root@stm32mp1:~# hwclock
2003-10-25 18:00:18.632338+00:00
 
reboot ....
 
root@stm32mp1:~# date
Mon Jun 27 03:19:28 UTC 2022

Am I miss something?:sad_but_relieved_face: 

thanks. 

This topic has been closed for replies.

1 reply

Olivier GALLIEN
Olivier GALLIENBest answer
Technical Moderator
August 26, 2022
Olivier GALLIEN In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
hochul yoo
Associate III
August 26, 2022

​Thanks,

I found the solution by link you provided. 

I need this commnd to set the system time from the RTC

hwclock --hctosys