I am trying to determine how Ubuntu 18.04 determines how to set the system clock for a computer that has a broken RTC clock and no access an NTP server and systemd-timesyncd disabled. Upon the boot the time is always 2018-01-28 10:58:48 EST. This appears very similar to
Where the time is reported as 2018-01-28 15:58. The only advice he got was to turn off timesyncd, which I already have disabled and also didn't solve his problem.
Normally, an application starts, gets a GPS signal, sets the clock and starts running. But it doesn't really need GPS to run. What it does need is for the clock to not go backwards in time. I thought I might be able to fix that if I knew how Ubuntu decides to set the time to 2018-01-28 10:58:48 EST.
One thing I did try was to enable systemd-timesyncd. While the computer isn't normally connected to the Internet, as a maintenance procedure, I may connect it. Then I get the correct time and it touch(es) a file at /var/lib/private/systemd/timesync/clock. If I disconnect from the Internet and manually touch the file, the next boot will use that time. But even that approach, while better, still can set the clock backwards as it effectively remembers the last time the computer was connected to the Internet.
That aside, it seems a mystery that Ubuntu would use the same time at boot if it can't determine a time and that time isn't something like Jan 1 of some year. If I knew what Linux was doing, I might be able to craft a solution. So far, except for the URL above, what I find is a lot of "how to use NTP" and "Using NTP is a good idea" etc. I would if I could but no Internet except in maintenance mode.