Skip to main content
Associate III
March 13, 2024
Solved

Can someone help me with RTC clock

  • March 13, 2024
  • 1 reply
  • 1084 views

Hello everyone, 

I want to Know if I can set RTC on "6" different time.

Through the Day .

Help with exampl.

Thank you. 

 

Best answer by mƎALLEm

You need to manage this by software. There is only one counter in RTC.

You set the RTC by GMT time and display the local time by adding +/- T (time offset) for each time zone.

See these threads:

https://community.st.com/t5/stm32-mcus-products/function-library-to-convert-between-utc-time-and-local-time/td-p/211219#:~:text=The%20STM32%20has%20no%20way,out%20of%20the%20embedded%20system.

https://community.st.com/t5/stm32-mcus-products/add-date-time-offset-set-time-zone/td-p/218010

1 reply

waclawek.jan
Super User
March 13, 2024

Which STM32?

What do you mean by 6 different times? Do you want to display simultaneously time in 6 different timezones, like time in Tokyo, Kuala Lumpur, Los Angeles, New York, London, Kyiv, at the same moment?

JW

Associate III
March 13, 2024

@waclawek.jan 

yes

 

mƎALLEm
mƎALLEmAnswer
Technical Moderator
March 13, 2024

You need to manage this by software. There is only one counter in RTC.

You set the RTC by GMT time and display the local time by adding +/- T (time offset) for each time zone.

See these threads:

https://community.st.com/t5/stm32-mcus-products/function-library-to-convert-between-utc-time-and-local-time/td-p/211219#:~:text=The%20STM32%20has%20no%20way,out%20of%20the%20embedded%20system.

https://community.st.com/t5/stm32-mcus-products/add-date-time-offset-set-time-zone/td-p/218010

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.