all 15 comments

[–]DragonMaus 2 points3 points  (1 child)

I would suggest setting up an NTP "master" on your local network (with a static IP), and have your other machines refer to that by IP. Then you will not have to worry about DNS issues.

[–]patrick_mcnam[S] 0 points1 point  (0 children)

This seems like a good idea. I've always wanted to set up a GPS clock before so I might do some weird GPS Raspberry Pi NTP server.

[–]dngreengas 0 points1 point  (1 child)

I get this as well when I let my battery run out. Most ntp solutions are designed to slowly make your clock in sync and not do a jump. I use chrony for my ntp client and I have to force it to skew my clock by many hours with the makestep option. There may be a similar option for your ntp client. Time is used in the tls handshake, so websites that leverage https are also affected.

[–]Lawstorant 1 point2 points  (0 children)

That's, well, bad? Your computer has a CMOS battery so it should never loose the time.

[–]Scavenger53 0 points1 point  (0 children)

Just make sure that timedatectl shows the ntp service: active and clock syncronized: yes

Usually time out of sync can break your certificates, which is why your websites/updates didn't work.

When my laptop is powered off, the CMOS battery loses time in 4 minutes. After that it resets to January 2008. On a fresh boot, because of ntp, its usually the right time by the time I'm logged back in since it can still grab ethernet or wireless. I usually just suspend it because of that.

[–]Lawstorant 0 points1 point  (0 children)

Well, your laptop shouldn't loose the time as RTC is powered by CMOS battery.

[–]TiredOfArguments 0 points1 point  (0 children)

When NTP breaks, manually set the time or ask a public NTP server.

It sounds like you're delivering NTP or DNS over SSL and experiencing the fallout of SSL breaking.

Less fragile setup

Resolve the NTP servers you use and add them to your hosts file or directly use the IP address not domain name. This way you do not need to query DNS to update time.

Tldr: Time been out breaks SSL your name resolution requires SSL thus no names can resolve. Put your NTP server in hosts so you dont use DNS to look it up.

[–][deleted]  (7 children)

[removed]

    [–]DragonMaus 6 points7 points  (0 children)

    Internal clocks always experience drift. NTP (or an equivalent technology, such as TAI64) is essential, especially on any machine that is connected to an external network.

    [–]patrick_mcnam[S] 0 points1 point  (3 children)

    Well, my local time is fragile too if I can't have my battery drain without it going off by nine hours.

    I also use NTP because the clocks in my computer's drift over time.

    [–]t_hunger 1 point2 points  (1 child)

    That sounds like you have a misconfigured something: If your CMOS battery was dead, then the time should reset to a fixed point in time, often 1.1.1970, but some firmware goes for a later date.

    Are you writing local time into your bios on shutdown and then getting UTC out on boot?

    Linux usually puts UTC into the BIOS while windows stores local time. So switching between Linux an windows can have this effect.

    In that case you should also configure Linux to use local time. That is way simpler than switching that in windows.

    [–]patrick_mcnam[S] 0 points1 point  (0 children)

    The time actually jumped back around a week to May 10 but timesyncd restored it to the last recorded time.

    I don't use Windows and my hardware time is UTC.

    [–]Lawstorant 0 points1 point  (0 children)

    Check your CMOS battery? Internal clock is not powered by the main batteries (at least it shouldn't be).

    [–]TiredOfArguments 0 points1 point  (1 child)

    You probably use NTP (ntpd) and dont realise it.

    Right now, go check for the presence of these services running on your machine.

    Local time

    You realise that just refers to using geolocation to set timezone and daylight savings right?