3

I'm testing various clock sources on a Raspberrypi Zero W with Raspbian Buster Lite. After removing the fake hardware clock

sudo apt remove --purge fake-hwclock

and disabling ntp

sudo timedatectl set-ntp false

at reboot the date is 2019-02-14 instead of 1970-01-01 as expected. What can be the cause of this behavior?

Even disabling the service systemd-timesyncd

sudo systemctl stop  systemd-timesyncd
sudo systemctl disable systemd-timesyncd 

at reboot the date is 2019-02-14.

The output of timedatectl status just after reboot is

               Local time: Thu 2019-02-14 11:14:38 CET
           Universal time: Thu 2019-02-14 10:14:38 UTC
                 RTC time: n/a
                Time zone: Europe/Rome (CET, +0100)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: no

I don't have /var/lib/systemd/clock but /var/lib/systemd/timesync/clock, the output of ls -l on that file is

-rw-r--r-- 1 systemd-timesync systemd-timesync 0 Nov 19 23:01 /var/lib/systemd/timesync/clock                                                                  

The timestamp is the shutdown time.

Since I purged fake-hwclock I don't have /etc/fake-hwclock.data.

systemd-timesync seems stopped

pi@raspberrypi:~ $ systemctl status systemd-timesyncd.service 
● systemd-timesyncd.service - Network Time Synchronization
   Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; disabled; vend
  Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
           └─disable-with-time-daemon.conf
   Active: inactive (dead)
     Docs: man:systemd-timesyncd.service(8)

Additional information, maybe relevant.

  1. I installed weewx, a software to manage weather stations, but i have no stations connected so I'm using the simulator driver.

  2. I use the autohotspot script to connect to a know wifi router or automatically generate an hotspot access point if no network is found

7
  • 3
    @goldilocks If I undertstand correctly is the fake-hwclock package that writes that timestamp and I removed it
    – matteol
    Nov 19, 2019 at 20:37
  • 1
    Whoops, missed that, all apologies -- but how about systemd-timesyncd? raspberrypi.org/forums/viewtopic.php?t=200385 Very likely fake-hwclock was superseded by that in buster.
    – goldilocks
    Nov 19, 2019 at 20:54
  • 2
    @goldilocks that's interesting but disabling the service doesn't solve the issue (see my edit)
    – matteol
    Nov 19, 2019 at 21:48
  • Could you add the output of timedatectl status to your post? Nov 20, 2019 at 8:26
  • 1
    And check the timestamp in /var/lib/systemd/clock and /etc/fake-hwclock.data, just in case one of them matches that 2019-02-14 date. Nov 20, 2019 at 8:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.