Simplest would be to add a RTC (real time clock) such as this:
You connect that up using I2C (4 wires including power and ground), set it once, and then it remembers the time with a backup battery.
Simplest would be to add a RTC (real time clock) such as this:
You connect that up using I2C (4 wires including power and ground), set it once, and then it remembers the time with a backup battery.