Im using a Raspberry Pi zero 2W and running the system with a powerbank. My issue is that the Witty Pi does not seem to successfully write the RTC time to the Raspberry on boot. I've tried booting both by schedule and with the power button and no difference.
The Raspberry Pi is not connected to the internet as I will be using it outdoor, far away from any infrastructure.
Here is an example from the last boot I tried. When the Raspberry Pi started the time was 17:00:00 as scheduled, but as you can see, the Witty Pi does not set the time.
From wittyPi.log:
[2025-04-30 16:43:25] Skip scheduling next shutdown, which should be done externally.
[2025-04-30 16:43:25] Schedule next startup at: 2025-04-30 17:00:00
From wittyPi.sh:
>>> Your system time is: 2025-04-30 16:20:29 CEST
>>> Your RTC time is: 2025-04-30 17:03:27 CEST
>>> Vout=4.90V, Iout=0.25A
From schedule.log:
--------------- 2025-04-30 16:43:24 ---------------
Skip scheduling next shutdown, which should be done externally.
Schedule next startup at: 2025-04-30 17:00:00
---------------------------------------------------
Why is it behaving like this, and what can I do to fix it?
Witty Pi does write RTC time to system on every boot, otherwise you would not see the time information in the log (you would see [xxxx-xx-xx xx:xx:xx] instead).
The issue you mentioned is the time stored in RTC is incorrect. The simplest way to fix it is to connect your Raspberry Pi to Internet, and choose "3. Synchronize with network time" when running wittyPi.sh. You only do this once, and then the correct time has been saved into RTC (your Raspberry Pi do not need Internet for this again).
I looked closer to your log, and I can see your Pi's system time is not synchronized with RTC time. Most probably something else (most probably some kind of time service) has changed the system time after Witty Pi's software wrote RTC time into the system. You may find out what it is by checking wittyPi.log and the system log together.