Ultra-simple tracking of date and time using millis() on microcontrollers, for example Arduino and ESP32.
Step 1:
Initialize current date/time variables in setup() of your code.
example,
//initialize date/time
month=1;
day=1;
year=21;
hour=0;
minute=0;
Step 2:
Call the this function whenever you need to calculate current date/time:
date_time_calculate();
important: Must be done at least once every 49 days, before the millis() timer overflows.
Step 3:
//Print out date/time
date_time_print();
Example code for use with IotWebConf and ESP32:
prampec/IotWebConf#213 (comment)