real time clock / date

How is the dietpi working?
I noticed, that before getting time from network it continues from last known date and time.
Is this information always somehow written to SD card? How often? Or writtne somewhere else?

thanx

Hi,

We use NTPD to obtain time sync. Runs during boot, and every day.

You can change this with:
dietpi-config > advanced options > Time sync mode

thanx for the reaction, but this I know already…

my question is, if I do not provide network (so it can not have a time info) what is the Linux time then?

I already noticed (not sure) that in such case DietPi continues from last known date and time, this would mean it must write to SD (?)
card regularly (or olny during shut down) the time info?

Time will stop on power off, time will resume on power on. Unless you have a RTC/network, it will always be incorrect, but, relative to the device.

I already noticed (not sure) that in such case DietPi continues from last known date and time, this would mean it must write to SD (?)
card regularly (or olny during shut down) the time info?

If you are using the default NTPD mode, once during boot, and once daily. 1/2 writes a day.

Time will stop on power off, time will resume on power on. Unless you have a RTC/network, it will always be incorrect, but, relative to the device.

OK, it will be incorrect but never going back into the past … (?) /not sure what you mean “relative” /


Is it known, where (which file) is the time info kept on SD card?

Thanx!



 cat /etc/fake-hwclock.data
2017-04-14 10:17:02



https://packages.debian.org/jessie/fake-hwclock

http://www.forum-raspberrypi.de/Thread-andere-speicherort-fuer-uhrzeit

The location that the date is saved to is coded into the fake-hwclock script. You could change that, but it will get changed back if an upgrade installs a newer version.

As the device doesnt match with our knowledge of actual time, time is relative to the device, it doesn’t know any different :slight_smile:

You could say, it will have its own time, outside our time :wink: