uc20 rpi not possible to update system time persistently without having internet access

Bug #1968312 reported by Bugra Aydogar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
New
Undecided
Unassigned

Bug Description

Hi,

While investigating the system-time behavior of UC20 without an RTC, I realized that it is not possible to update the system time persistently. According to the documentation available here => https://ubuntu.com/core/docs/uc20/system-time, systems without RTC gets the time from the mtime of `/var/lib/systemd/timesync/clock`, however if the time is modified by using `timedatectl` or `date` utilities, the system time is updated but the mentioned path's mtime is not updated and thus in the next reboot, system brings up with the kernel-snap's build date.

Repro Steps:
- Create a UC20 image for RPi (you can also disable console-conf)
- Boot it but do not connect to internet
- Create a system-user assertion and login to the system.
- Check the time and update it either with date or timedatectl utiltiy.
- Check the mtime of /var/lib/systemd/timesync/clock, you will realize it is not updated.
- Reboot
- The time is not updated.

Thanks,
Bugra

Revision history for this message
Bugra Aydogar (bugraaydogar) wrote :

It seems like this is a known behavior(or issue) within the systemd. I have checked and found it out that the behavior is improved with the commit => https://github.com/systemd/systemd/commit/33e82f3ef33a2497f9838a5fbb924c7501d8dd9e#

This is the original github issue => https://github.com/systemd/systemd/issues/10620

The mentioned fix is available within the systemd version 250. But from the Ubuntu point of view;
Ubuntu Desktop 20.04 and Core20 is using systemd version 245.4-4 and Ubuntu Desktop 22.04 and Core22 will used systemd version 249.11.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.