Windows clock not keeping time in dual boot situation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • katzdvd
    Lord of Digital Video
    Lord of Digital Video
    • Feb 2006
    • 2198

    Windows clock not keeping time in dual boot situation

    I am running dual boot/ Win XP & Linux. I have noticed that when I infrequently boot into Win XP, the clock is incorrect. Does the clock not keep time from the BIOS/System clock? Shouldn't it stay on the correct time, even if I do not boot into XP for a week? It is off by hours, not just a few minutes.
  • MilesAhead
    Eclectician
    • Nov 2006
    • 2615

    #2
    found this via google. don't know if he's right or wrong but seems to me I recall having to mess with how Linux set the time so it didn't mess me up when I was multibooting

    A common reason that time gets way out of sync (even with NTP on) on dualboot (windows/ Linux) machines is the hardware clock being set to UTC time, which windows cannot handle properly. Use localtime.


    found it on this page:
    Alright, I set up NTP when I installed the OS (2006 i586) but I'm not sure it's actually ever synced the time correctly automatically. NTP is set up properly (right time zone, working server...) but it will never display the right time unless I make it manually sync. Here's where it gets weird. I...

    Comment

    • katzdvd
      Lord of Digital Video
      Lord of Digital Video
      • Feb 2006
      • 2198

      #3
      Hi Miles,

      Thanks for the info. I checked the BIOS clock & it was off. I reset & will check XP in awhile to see if the problem is resolved. I'm not sure I understand the whole UTC thing & how it relates to XP/linux...

      Are you saying linux is the culprit for hosing the time in the bios?

      Comment

      • MilesAhead
        Eclectician
        • Nov 2006
        • 2615

        #4
        sketchy info

        Originally Posted by katzdvd
        Hi Miles,

        Thanks for the info. I checked the BIOS clock & it was off. I reset & will check XP in awhile to see if the problem is resolved. I'm not sure I understand the whole UTC thing & how it relates to XP/linux...

        Are you saying linux is the culprit for hosing the time in the bios?
        Sorry for sketchy info since it's been a few years since I Linuxed on down.It appears Windows can't deal with the hardware clock being set to utc. Use the hwclock command in Linux to set the hardware clock using the localtime option and that should fix it up. Here's a man page:

        Comment

        • katzdvd
          Lord of Digital Video
          Lord of Digital Video
          • Feb 2006
          • 2198

          #5
          We were on the right track here, but needed to do it a bit differently. Here is the solution that worked for me. When logging in as root, I got the following error;

          hwclock is unable to get I/O port access: the iopl(3) call failed.
          Probably you need root privileges.
          Huh?!?! The term. was already showing me logged in as root!!! After a bit more searching, I found the following & it worked.


          If turning off UTC does not work in the clock applet try to change it manually.

          In a terminal:

          gksudo gedit /etc/default/rcS

          Look for this line: UTC=yes

          Change it to: UTC=no

          And save it:

          Then set the time if it is wrong in System/Administration/Time and Date

          Then either reboot or do this in a terminal:

          sudo /etc/init.d/hwclock.sh restart
          Hopefully this will be of assistance to others that may encounter the same problem.

          Comment

          • MilesAhead
            Eclectician
            • Nov 2006
            • 2615

            #6
            I seem to remember doing it at the command line using the Date command, but it's been awhile so my memory could be faulty. afa changing time with the applet, that's the only time I can remember a running version of Linux hard locking!! I don't remember if it was redhat or mandrake, but I right clicked on the clock on the desktop and my monitor went out of sync!! Really weird!!!

            Glad you got it though.

            Comment

            Working...