How to update the RTC date (time set to last timestamp before shutdown)
#1
After using my PineBook Pro for a few days, I noticed that the time was wrong (set to the exact date and time of the shutdown) when it was booted without being connected to the internet.

I don't know if it's a rare issue or not, but since I couldn't find any fix for this I figured I'd make a small tutorial in case someone else have the same issue in the future.

After searching for a bit, I found that the PineBook Pro have a Real Time Clock (RTC) so it should be able to keep track of time while being powered off.

My RTC date and time wasn't apparently set correctly (it was set to an arbitrary date in 2007) which confused the system that decided to use the last known timestamp instead. Thankfully, the fix is easy:

1. Check if the RTC date and time match the actual date and time by running:
Code:
sudo hwclock -r

2. If the value isn't correct, make sure that the system date and time is correct by running the `date` command:
Code:
date

3. If the system date and time isn't correct, either change it manually or connect to the internet so the clock adjusts automatically.
4. To set the RTC date and time to the system date and time, run the command:
Code:
sudo hwclock -w

5. Check that the RTC date is now correct by running the `sudo hwclock -r` command again.
6. Your PineBook Pro will now have the correct date and time, even offline.
#2
I have also had this issue.
The RTC started working again after I booted Debian from a SD card.
Not sure why it started working after that.
Perhaps some other distro will work too.


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to update Manjaro to 20.10 pineitup 8 13,324 07-31-2021, 04:44 AM
Last Post: jiyong
  Installing Docker on Pinebook Pro - update 1/18/20 SuperXkoodA 4 7,447 03-24-2020, 03:19 PM
Last Post: chaoskampf

Forum Jump:


Users browsing this thread: 1 Guest(s)