localtime, UTC, yast:system:"date and time" weirdness

My OpenSuSE 12.2 is such a recent install, that I only just today looked at the time settings…

Unless you count making sure the UTC checkbox was NOT checked when I told the installer what timezone applied…

I have installed {on this laptop} 4 Linux distros plus Vista. And yesterday I was buzy with things like, “zypper up”, “apt-get upgrade” & “equo upgrade”. I wasn’t really surprised when some of my settings were overwritten by default values. This morning I booted Vista, and happened to notice that it’s time display was off by about 5 hours. “Great!” I said to myself, “Looks like one of my Linux is writing UTC to the hardware clock again…”

So I started booting the installed Linux one after the other, checking/fixing the hardware clock from the bios settings screen just before each boot. And then checking the time again with “date” as soon as each Linux finished booting to console. Turns out OpenSuSE must have ignored {or forgotten} that I had carefully NOT checked the UTC box.

{Yes I know setting the hardware clock to UTC is the standard way to do it in Linux. But I don’t agree with it. Doesn’t matter why. But I simply will not keep any operating system that doesn’t let me see my local time when I open the bios settings utility. I don’t care if it corrects the time using some on line time server, or not. But if it’s going to store the corrected time in my bios clock, it better store it in my local time.}

So to solve this for OpnSuSE I logged in as root and made sure that /etc/localtime was in fact, /usr/share/zoneinfo/America/New_York… Then I corrected the system time with “date -s” and then checked that “date” returned the correct time correctly labeled as “EDT”…

Then I stored the corrected time to the hardware clock with, “hwclock --localtime --systohc”. Next I re-imported the time with “hwclock --localtime --hctosys”, and checked the results with date. So far so good, but just in case some GUI setting might override my settings I logged into another tty as my normal user, and ran startx. Then I used the yast2 GUI to open “System: date and time” Noted again that the UTC check box was NOT checked.

The weird part is that when I clicked “OK”. And the pop-up confirmation text, that advised me that I’d have to do my own daylight savings adjustment, also claimed that my computer only has Linux installed. This puzzles me because OpenSuSE’s automatically generated grub menu correctly includes the Vista that is, in fact, installed to /dev/sda1…

Why wouldn’t yast detect the existence of Vista?

Is there anything else I need to do to insure that OpenSuSE doesn’t mess with my localtime hardware clock anymore???

Before I start reading your long, long story, did you read: What is UTC or GMT Time & a possible issue with openSUSE 12.2 and its solution. - Blogs - openSUSE Forums ?

your long, long story
ha funny

Sometimes though you have to read the whole thing, bummer. :wink:

@jtwdyp…I have done this same thing a couple of days ago, not exactly as “thorough” as you but setting the date/time with Yast (The only thing I did) blah blah Does Work. I think there is some flaw with the installer that that setting does not stick.

As to your other point, I think you probably realize how complicated it would be to figure out if windows is installed and take the appropriate steps. Lots of code. The problem would be solved if the installer would write the correct settings in the first place. Most other distros I have installed all do the same thing, ie, Ask on install and then you are on your own after that. At least OpenSuse has a GUI to change it easily.

Would have, had I found it. Have now. Might have worked…

But according to “man hwclock” that was effectively done, when I did the:

hwclock --localtime systohc

In any case, “thanks!” Now at least I’m reasonably sure that there isn’t some other “OpenSuSE only” process that I need to do.

Sounds likely.
Over the years I’ve found a number of different steps I’ve needed take on various Linux distros to accomplish this. Took notes. When in doubt, try everything…

As to your other point, I think you probably realize how complicated it would be to figure out if windows is installed and take the appropriate steps. Lots of code. The problem would be solved if the installer would write the correct settings in the first place. Most other distros I have installed all do the same thing, ie, Ask on install and then you are on your own after that. At least OpenSuse has a GUI to change it easily.
Yeah, I guess. Personally though, given, “easily found”, “clear instructions” I’m more comfortable with CLI solutions. You know, something I can paste into the command prompt…

Still, given how many users are totally dependent on “point N’ click” methods, I think they did a good thing…

The UTC selections has been that way for a few versions now. What is different now, is that it now tells you that the system will not be able to auto change your clock if UTC is not selected. The only thing the UTC option does is to determine if the timezone offset needs to be applied to the hardware clock at boot and shutdown. It has nothing to do with the system being able to change time twice a year.

I turned off UTC on the two computers I just installed 12.2 on. After install, UTC was turned back on. This is where the problem is, it did not remember my selection. The Yast gui also gave me the waring about not using UTC.

I think the message about no being able to auto time change is to scare you into using UTC. For years now I have been getting a waring during install that /boot is on an XFS partition and the system might not be able to boot. When both GRUB and the openSUSE kernel are configured to boot to an XFS partition. So why are we getting these messages when what they warn is incorrect?

Dave W

dwestf wrote:
> I think the message about no being able to auto time change is to scare
> you into using UTC. For years now I have been getting a waring during
> install that /boot is on an XFS partition and the system might not be
> able to boot. When both GRUB and the openSUSE kernel are configured to
> boot to an XFS partition. So why are we getting these messages when
> what they warn is incorrect?

Unless your computer is switched on at the precise moment the time
changes, it has no way of knowing whether the BIOS time has already been
adjusted by some other operating system. So unless it has NTP or some
other external time source available, it doesn’t know what the correct
time is.

Have you raised a bug report about the XFS warning?

Yes, just created bugs for UTC, XFS, and LDAP in YAST2.

I have seen my computers that were turned off at time change, correct the time when the system was booted. The only time I have had to force a time correction is on my dual booted windows/linux computer. And that is because both OS’s wanted to change the clock. I don’t see reason for the wold is going to end message by not selecting UTC. It would be better if the message said that Linux can do a better job managing time if UTC is selected, we don’t need the panic message. The install not remember my selection is a bug.

Dave

Folks, for those you who have problem - do you run NTP? If yes - what is the value of NTPD_FORCE_SYNC_HWCLOCK_ON_STARTUP in /etc/sysconfig/ntp (it does not appear that it can be changed via YaST2 NTP module).

You can check for running ntp using “rcntp status” or

bor@opensuse:~> systemctl status ntp.service
ntp.service - LSB: Network time protocol daemon (ntpd)
      Loaded: loaded (/etc/init.d/ntp)
      Active: active (running) since Fri, 19 Oct 2012 19:25:49 +0400; 1h 30min ago
     Process: 799 ExecStart=/etc/init.d/ntp start (code=exited, status=0/SUCCESS)
      CGroup: name=systemd:/system/ntp.service
          └ 912 /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -g -u ntp:...

On 2012-10-19 16:06, dwestf wrote:
>
> Yes, just created bugs for UTC, XFS, and LDAP in YAST2.
>
> I have seen my computers that were turned off at time change, correct
> the time when the system was booted. The only time I have had to force
> a time correction is on my dual booted windows/linux computer. And that
> is because both OS’s wanted to change the clock. I don’t see reason for
> the wold is going to end message by not selecting UTC. It would be
> better if the message said that Linux can do a better job managing time
> if UTC is selected, we don’t need the panic message. The install not
> remember my selection is a bug.

In the past, openSUSE attempted to do the time change correction, but in
12.2 this has been abandoned and there will be no adjustment from
openSUSE. This has been done because it is impossible to do it right, so
any bugzilla on this will be closed as invalid as soon as they notice it.

Windows works right because it assumes that it is the only operating
system installed in the computer. The adjustement will of course fail if
you have two systems installed, because both will try to do the
adjustment (there is no way to know it has already been done). If there
is a network time reference, the clock can be readjusted right.

So, if you want to set the cmos bios clock to local time? Ok, but expect
problems, and expect them to be ignored by the devs.

Even Windows is turning around to utc…


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Sorry if this will be double post, but I do not see it in forum index (although I can see it in thread view). Strange. I very much suspect what happens but need confirmation.

Folks, for those you who have problem - do you run NTP? If yes - what is the value of NTPD_FORCE_SYNC_HWCLOCK_ON_STARTUP in /etc/sysconfig/ntp (it does not appear that it can be changed via YaST2 NTP module).

You can check for running ntp using “rcntp status” or

bor@opensuse:~> systemctl status ntp.service
ntp.service - LSB: Network time protocol daemon (ntpd)
      Loaded: loaded (/etc/init.d/ntp)
      Active: active (running) since Fri, 19 Oct 2012 19:25:49 +0400; 1h 30min ago
     Process: 799 ExecStart=/etc/init.d/ntp start (code=exited, status=0/SUCCESS)
      CGroup: name=systemd:/system/ntp.service
          └ 912 /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -g -u ntp:...

So, who is doing time change in 12.2? If there is none then it does not matter if you are using UTC or not.

Also the bug was for the the installer not remembering my choice. I don’t believe the message should be the panic message that it is.

Dave W.

Are you using NTP?

At work yes, at home no, but that is not the problem.

The problem here is that the installer is over writing a choice that was made. If I choose to use local time that should be the end of it. The distro should not change it back utc on it’s own. That is the reason that we have choices. If you only want to something one way then get rid of the choice. If you are going to give a choice then remember it.

That is what the openSUSE team did with ldap, they took away the choice for System Security Services Daemon SSSD. In 12.1 it was on by default, but could be turned off. In 12.2 there is no option to turn it off. The choice was taken away, so now I need make config file changes by hand to join my ldap server.

Dave W

dwestf wrote:
> Yes, just created bugs for UTC, XFS, and LDAP in YAST2.

Do you have the bug numbers please?

LDAP
https://bugzilla.novell.com/show_bug.cgi?id=785865
Mergred with
https://bugzilla.novell.com/show_bug.cgi?id=775167

XFS Warning on Install
https://bugzilla.novell.com/show_bug.cgi?id=785864

UTC
https://bugzilla.novell.com/show_bug.cgi?id=785868

I just tried a workaround for LDAP in YAST2 on one of my computers.
Un-install yast2-ldap-client, break packages. install yast2-client-ldap rom 12.1 update repo. locked 12.1 version in software management. Amazing, it works. Like I said in the bug report, there was no reason to write a new gui if the old one worked and there was nothing new that was needed.

Dave W

dwestf wrote:
> UTC
> https://bugzilla.novell.com/show_bug.cgi?id=785868

Ok, but earlier you said

> The problem here is that the installer is over writing a choice that
> was made. If I choose to use local time that should be the end of it.
> The distro should not change it back utc on it’s own.

and

> Also the bug was for the the installer not remembering my choice.

But that isn’t what your bug is about.

FWIW, I agree with the two statements you made above, while I don’t
agree with your issue about the system not being able to change time
unless the clock is set to UTC. Furthermore, I suspect the bug
triagers/maintainers are more likely to share my opinion than yours in
this instance. You even provided the evidence; the behaviour about not
changing daylight saving is documented.

So if you want to at least get the bug fixed that everybody agrees about

  • “After boot the hardware clock is set to UTC again” - you need to
    clearly state that that is a bug. Otherwise, you’re just going to get
    the whole bug closed, IMHO. You need to clearly separate your two concerns.

On 10/23/2012 12:26 PM, dwestf wrote:
> If I choose to use local time that should be the end of it.

https://bugzilla.novell.com/show_bug.cgi?id=774553
https://bugzilla.novell.com/show_bug.cgi?id=779440
https://bugzilla.novell.com/show_bug.cgi?id=785868
https://bugzilla.novell.com/show_bug.cgi?id=769535
https://bugzilla.novell.com/show_bug.cgi?id=773323
https://bugzilla.novell.com/show_bug.cgi?id=764690
https://bugzilla.novell.com/show_bug.cgi?id=732769


dd

I added a comment to the bug stating the the choice was not being remembered.

On 2012-10-22 16:06, dwestf wrote:
>
> robin_listas;2497209 Wrote:
>>
>> In the past, openSUSE attempted to do the time change correction, but
>> in 12.2 this has been abandoned and there will be no adjustment from
>> openSUSE.
>
> So, who is doing time change in 12.2? If there is none then it does
> not matter if you are using UTC or not.

Notice that what I said applies to the “local” setting only. If you have
utc on the cmos, then there is adjustment.

> Also the bug was for the the installer not remembering my choice. I
> don’t believe the message should be the panic message that it is.

Yes, there are bugzillas on that. However, an installation bug will not
be corrected till the next version (12.3) is released.

What is UTC or GMT Time & a possible issue with openSUSE 12.2 and its
solution.

SDB:Configuring the clock

View this
thread
View this thread
View this
thread
View this thread

Make sure that your particular problem is reported properly.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Well … that is from /etc/init,d/ntp:

/sbin/hwclock --systohc $HWCLOCK --utc --noadjfile

May be it is not a problem … may be it is.