Automatic switch from Daylight Savings Time to Standard Time in openSUSE

I have been meaning to mention this for quite some time (year or two?), and of course today I am reminded of this minor piece of information. I am posting this in the Install/Boot/Login section because Users most often come across this when they are doing the install.

When selecting the time for the Hardware clock as either UTC or Local Time, the advice is given that setting the Hardware Clock to Local Time will result in the machine not automatically adjusting the time at Savings Time/Standard Time changeovers in fall & spring.

However, for the past several years, I have noticed that when I set the Hardware clock to Local Time, the time changes are automatically taking place, in spite of the warning.

(This is a good thing, of course, not complaining. :wink: )

I just thought I would mention this, so Users do not make their choice between UTC and Local Time solely on that (apparent) misinformation.

On 2014-11-03 04:16, Fraser Bell wrote:

> However, for the past several years, I have noticed that when I set the
> Hardware clock to Local Time, the time changes are automatically taking
> place, in spite of the warning.
>
> (This is a good thing, of course, not complaining. :wink: )

It doesn’t mean what you think it means, though :wink:

> I just thought I would mention this, so Users do not make their choice
> between UTC and Local Time solely on that (apparent) misinformation.

The information given at install is correct >:-)
But too short. Or typically terse.

I’ll explain.

Say you halt the machine on the night of 2014-10-25, and boot it on the
morning of 2014-10-26. That was daylight change day, at least in Spain.

Say that your CMOS was set to /local/ time.

Say you do not have internet at all.

Well, then I say :slight_smile: ] that your machine will be off by one hour on
the morning boot.

/But/ if you have internet and you enabled ntp, aka internet time in
other oses parlance, your machine will inquire the correct time from
internet and correct itself, maybe before you have time to notice. It is
possible that the event is logged.

That’s the meaning of the paragraph during install and perhaps on
release notes. Not what you thought :stuck_out_tongue_winking_eye:

It also has other meanings.

Like that Windows will change the time in the CMOS an hour in the
/correct/ direction when it boots that day, even if Linux changed it
earlier. And if instead you boot Linux later than Windows, it will not
say “Hey! Today it is daylight change day! Let’s change the hour.” Which
Windows had already done, resulting in a double change. The openSUSE
devs have finally given up in outsmarting Windows, and just leave the
clock alone, change not the hour.

Of course, if the machine has an external clock reference, like
Internet, it will indeed correct the time. It just doesn’t change it on
“its own” (via openSUSE boot scripts).

On the other hand, if the machine is running at 3:00 AM, which is the
hour that the change is done in Spain, you will see how the clock is
adjusted automatically, by the kernel:


> <3.6> 2014-10-26 00:58:01 Telcontar systemd 1 - -  Starting Session 461 of user news.
> <3.6> 2014-10-26 01:00:01 Telcontar systemd 1 - -  Starting Session 462 of user root.
> <3.6> 2014-10-26 01:58:01 Telcontar systemd 1 - -  Starting Session 488 of user news.
> <3.6> 2014-10-26 02:00:01 Telcontar systemd 1 - -  Starting Session 489 of user root.
....
> <3.6> 2014-10-26 02:55:01 Telcontar systemd 1 - -  Starting Session 514 of user news.
> <3.6> 2014-10-26 02:58:01 Telcontar systemd 1 - -  Starting Session 515 of user news.
> <3.6> 2014-10-26 02:00:01 Telcontar systemd 1 - -  Starting Session 516 of user cer.
> <3.6> 2014-10-26 02:00:01 Telcontar systemd 1 - -  Starting Session 517 of user root.
> <3.6> 2014-10-26 02:00:01 Telcontar systemd 1 - -  Starting Session 518 of user cer.
> <3.6> 2014-10-26 02:03:01 Telcontar systemd 1 - -  Starting Session 519 of user news.
> <3.6> 2014-10-26 02:05:01 Telcontar systemd 1 - -  Starting Session 520 of user news.
....
> <3.6> 2014-10-26 02:55:01 Telcontar systemd 1 - -  Starting Session 541 of user news.
> <3.6> 2014-10-26 02:58:01 Telcontar systemd 1 - -  Starting Session 542 of user news.
> <3.6> 2014-10-26 03:00:01 Telcontar systemd 1 - -  Starting Session 543 of user root.
> <3.6> 2014-10-26 03:00:01 Telcontar systemd 1 - -  Starting Session 544 of user cer.

Do you see how the clock goes back at 3:00? from 2:59 it goes back to
2:00 instead of 3:00 just once. It is curious to see if you are actually
watching the display.

(yes, you can reproduce it in a virtual system and check, with tricks to
isolate the time)


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Just set the hardware clock to UTC, and be done with it. You will never have a problem again.

If you are running Windows, then define a registry entry there:


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal

Define that to be a dword, and set its value to 1 (or to 0001). You might need to reboot for Windows to recognize this setting.

Windows Vista, Windows 7, Windows 8, Windows 8.1 all support this.

There’s only half-baked support in Windows XP, but XP has passed its end-of-life. So there is no reason to not switch to using UTC with the hardware clock.

If you do it any other way, you will get mixed results. It may depend on whether your computer is running linux at the time switch-over. And, even if linux takes care of the time change, Windows might do that a second time when you next boot Windows, leaving you one hour off. With the hardware clock set to UTC, it works more smoothly.

On 2014-11-03 05:46, nrickert wrote:
>
> Just set the hardware clock to UTC, and be done with it. You will never
> have a problem again.
>
> If you are running Windows, then define a registry entry there:

Not all versions. 7 and 8, absolutely. Vista, with caveats. Others, no.

> If you do it any other way, you will get mixed results. It may depend
> on whether your computer is running linux at the time switch-over. And,
> even if linux takes care of the time change, Windows might do that a
> second time when you next boot Windows, leaving you one hour off. With
> the hardware clock set to UTC, it works more smoothly.

Yep to all.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Thanks, Carlos & nrickert.

Interesting and informative points, most of which I had not considered, others that I have answers or alternate answers for.

But, mainly, there is the point of NTP … which had briefly crossed my mind when I wrote the original post (and was going to tack into the end of it, but forgot by the time I reached the end of my message :shame:). See, I do have NTP running on all machines, and as daemon (even have an internal NTP server on my LANs and WAN), so yes – it would be addressed at system boot time.

On 2014-11-03 09:46, Fraser Bell wrote:
>
> Thanks, Carlos & nrickert.
>
> Interesting and informative points, most of which I had not considered,
> others that I have answers or alternate answers for.

The clock in Linux happens to be one of my pet subjects. I once wrote a
micro howto about it, back on SuSE times.

> But, mainly, there is the point of NTP … which had briefly crossed my
> mind when I wrote the original post (and was going to tack into the end
> of it, but forgot by the time I reached the end of my message :shame:).
> See, I do have NTP running on all machines, and as daemon (even have an
> internal NTP server on my LANs and WAN), so yes – it would be addressed
> at system boot time.

It is easy to forget that “detail” :slight_smile:

The suse (booting) time scripts were designed when Internet connectivity
was not ubiquitous, and they still consider that situation. They tried
hard to keep a correct clock all year round, and doing so with
cmos=local always failed for one group of people or another. It was
impossible (with multiboot) and they gave up.

NNTPD makes that hardship needless.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)