Skip to main content
Associate III
April 1, 2024
Solved

UNIX time

  • April 1, 2024
  • 2 replies
  • 1249 views

Is there a new "standard" way to handle time other than the original UNIX time was mentioned in AN5406 - Rev 7 - How to build a LoRa® application with STM32CubeWL, which will overflow in year 2038?

TIA

Best answer by STTwo-32

Hello  @David_ 

On the Current Implementation, we are only using UNIX time as mentioned on the application note.

Best Regards.

 

2 replies

STTwo-32
STTwo-32Best answer
Technical Moderator
April 24, 2024

Hello  @David_ 

On the Current Implementation, we are only using UNIX time as mentioned on the application note.

Best Regards.

 

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.
Tesla DeLorean
Guru
April 24, 2024

You can use a different starting epoch, ie not 1970's, but rather Jan 1 2024, or something

You can use 64-bit time

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
David_Author
Associate III
April 24, 2024

Many thanks.  I was told that GCC can use 64 bit time by command line option.  Yet to find out how to put in the command line option within the STM32Cube toolchain

"Starting with bookworm, you can compile C using gcc -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 to use 64bit time_t"