On Fri, Aug 28, 2020 at 10:48:18AM +0300, Mantas Mikulėnas wrote: > On Fri, Aug 28, 2020, 10:06 Ulrich Windl <Ulrich.Windl@xxxxxxxxxxxxxxxxxxxx> > wrote: > > > >>> Mark Corbin <mark@xxxxxxxxxxxx> schrieb am 27.08.2020 um 12:33 in > > Nachricht > > <c2edc2b5-0c6a-2d34-42ff-569c2626294a@xxxxxxxxxxxx>: > > > Hello > > > > > > I am working on time synchronisation issues at boot for systems without > > > an RTC (using balenaOS on a Raspberry Pi 3) and have some questions > > > about how journald assigns timestamps to log messages. > > > > > > > One idea would be to have a "timestamp file" (much like a low-resolution > > software RTC) that is updated periodically when it's known that the system > > time > > is correct. Then after boot you would get a good guess, and time wouldn't > > jump > > backwards, too. > > > > I believe systemd already does that, although I keep forgetting the details > – not sure if it's part of core or if it's part of systemd-timesyncd. timesyncd: Files /var/lib/systemd/timesync/clock The modification time of this file indicates the timestamp of the last successful synchronization (or at least the systemd build date, in case synchronization was not possible). On boot, time is stepped to the timestamp of above file. -- Tomasz Torcz To co nierealne – tutaj jest normalne. tomek@xxxxxxxxxxxxxx Ziomale na życie mają tu patenty specjalne. _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel