I searched the forum, tried and found no answer, and wondered why the system time keeps returning back to the old time after a reboot (no power down) cycle. I do not have RTC or battery installed.
Why System clock synchronized sometimes show YES, and sometimes show NO? How do I make it permanently YES? Is it the cause of returning back to the old time after a reboot cycle?
After a sudo hwclock -w, use date command to check is showing current. after a reboot cycle, RTC time: go back to Thu 1970-01-01 00:04:07.
Local time: Fri 2023-09-08 12:15:45 +08
Universal time: Fri 2023-09-08 04:15:45 UTC
RTC time: Fri 2023-09-08 04:15:45
Time zone: Asia/Singapore (+08, +0800) System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Local time: Fri 2023-09-08 12:16:54 +08
Universal time: Fri 2023-09-08 04:16:54 UTC
RTC time: Thu 1970-01-01 00:01:08
Time zone: Asia/Singapore (+08, +0800) System clock synchronized: no
NTP service: active
RTC in local TZ: no
Local time: Wed 2023-09-06 11:36:07 +08
Universal time: Wed 2023-09-06 03:36:07 UTC RTC time: Thu 1970-01-01 00:04:07
L4T by default uses RTC1, which is made by NVIDIA and is not connected to any external power, so it’s expected that time won’t be saved across different boots.
You need to switch to RTC0 for saving time, which can be supported with a battery, but you have to install it yourself.
okay, but power is never disconnected or switched off at all throughout the reboot cycle. How can that happen? RTC1 not connected to external power, where it gets it’s power, what RTC1 “scope of work”?
why is System clock synchronized: yes, sometime NO?
direct Router and handphone hotspot connection seem to have different behaviors too.
whichever network connection I use, I can apt-get. so I do not understand where is the issue. under the UI, Date and time Automatic Sync is enabled.
$ sudo apt-get check
Reading package lists… Done
Building dependency tree
Reading state information… Done
$ sudo hwclock -r
1970-01-01 07:31:25.960013+07:30
$ sudo timedatectl status
Local time: Wed 2023-09-06 11:33:38 +08
Universal time: Wed 2023-09-06 03:33:38 UTC
RTC time: Thu 1970-01-01 00:01:38
Time zone: Asia/Singapore (+08, +0800)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
$ date
Wed 6 Sep 11:33:09 +08 2023
after I manually change the date and time from the UI, the same command perform differently, without rebooting and using the same network.
I can concluded that the automatic date & time is not working.
sudo systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-09-12 16:15:32 +08; 19min ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 357 (systemd-timesyn) Status: “Idle.”
Tasks: 2 (limit: 18143)
Memory: 1.1M
CGroup: /system.slice/systemd-timesyncd.service
└─357 /lib/systemd/systemd-timesyncd
Sep 12 16:31:55 systemd-timesyncd[357]: Timed out waiting for reply from 167.172.70.21:123 (0.pool.ntp.org).
Sep 12 16:32:05 systemd-timesyncd[357]: Timed out waiting for reply from 106.10.186.201:123 (0.pool.ntp.org).
Sep 12 16:32:15 systemd-timesyncd[357]: Timed out waiting for reply from 172.104.44.120:123 (1.pool.ntp.org).
Sep 12 16:32:26 systemd-timesyncd[357]: Timed out waiting for reply from 106.10.186.200:123 (1.pool.ntp.org).
Sep 12 16:32:36 systemd-timesyncd[357]: Timed out waiting for reply from 129.150.48.1:123 (1.pool.ntp.org).
Sep 12 16:32:46 systemd-timesyncd[357]: Timed out waiting for reply from 162.159.200.123:123 (1.pool.ntp.org).
Sep 12 16:32:56 systemd-timesyncd[357]: Timed out waiting for reply from 95.81.173.74:123 (0.fr.pool.ntp.org).
Sep 12 16:33:07 systemd-timesyncd[357]: Timed out waiting for reply from 51.38.113.118:123 (0.fr.pool.ntp.org).
Sep 12 16:33:17 systemd-timesyncd[357]: Timed out waiting for reply from 5.196.160.139:123 (0.fr.pool.ntp.org).
Sep 12 16:33:27 systemd-timesyncd[357]: Timed out waiting for reply from 176.137.36.37:123 (0.fr.pool.ntp.org).
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-10-02 15:13:28 +08; 25s ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 3633 (systemd-timesyn) Status: “Connecting to time server 216.239.35.8:123 (time.google.com).”
Tasks: 2 (limit: 18143)
Memory: 1.0M
CGroup: /system.slice/systemd-timesyncd.service
└─3633 /lib/systemd/systemd-timesyncd
Oct 02 15:13:28 systemd[1]: Starting Network Time Synchronization…
Oct 02 15:13:28 systemd[1]: Started Network Time Synchronization.
Oct 02 15:13:39 systemd-timesyncd[3633]: Timed out waiting for reply from 216.239.35.4:123 (time.google.com).
Oct 02 15:13:49 systemd-timesyncd[3633]: Timed out waiting for reply from 216.239.35.0:123 (time.google.com).
Local time: Tue 2023-09-12 16:29:27 +08
Universal time: Tue 2023-09-12 08:29:27 UTC RTC time: Thu 1970-01-01 00:14:33
Time zone: Asia/Singapore (+08, +0800)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
Local time: Mon 2023-10-02 15:15:20 +08
Universal time: Mon 2023-10-02 07:15:20 UTC RTC time: Mon 2023-10-02 07:15:20
Time zone: Asia/Singapore (+08, +0800)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
do not know. still happen without a battery installed and Automatic date and time is enabled. Network is okay because apt-get update and upgrade works.