Page 1 of 2 12 LastLast
Results 1 to 10 of 20

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

  1. #1

    Default 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???

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,171

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

    Henk van Velden

  3. #3
    Join Date
    Sep 2012
    Location
    Maryland, US
    Posts
    623

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

    your long, long story
    ha funny

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

    @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.

  4. #4

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

    Quote Originally Posted by hcvv View Post
    Would have, had I found it. Have now. Might have worked...

    But according to "man hwclock" that was effectively done, when I did the:
    Code:
    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.

    Quote Originally Posted by anika200 View Post
    ha funny

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

    @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.
    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...

  5. #5
    Join Date
    Aug 2008
    Location
    Maryland
    Posts
    208

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

    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

  6. #6

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

    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?

  7. #7
    Join Date
    Aug 2008
    Location
    Maryland
    Posts
    208

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

    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

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

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

    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)

  9. #9
    Join Date
    Sep 2012
    Posts
    5,144

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

    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
    Code:
    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:...

  10. #10
    Join Date
    Sep 2012
    Posts
    5,144

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

    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
    Code:
    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:...

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •