Predefined Macros for Time Initialization

When using the RTC to generate a timestamp, there is a necessity for a correct initial time. Instead of manually entering the initial value of the time struct, it is possible to use predefined GCC macros for application compilation date and time. It may be noted that a fresh compilation must be completed immediately before flashing the device. If there is a delay between compilation and flashing, the initial time will be incorrect, and therefore also the generated timestamp.

As can be seen at https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html, there are strings defined as follows, which can be processed accordingly into the predefined time struct members: