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

Thread: Time sync without hardware at GMT

  1. #1
    Join Date
    Jul 2008
    Beans
    120
    Distro
    Ubuntu 13.10 Saucy Salamander

    Question Time sync without hardware at GMT

    I'm trying to find a way to keep ubuntu from changing my hardware clock to GMT when I set the time. Specifically linux likes to keep the hardware clock on GMT and then apply the time zone offset (say, MST) on top of it.

    The issue I have is my System76 laptop dual boots Windows XP. XP needs the hardware clock to be set to local time and can't really play the GMT/MST games that linux can. Once upon a time in another distro I was able to specify it that the hardware clock should be on local time, too.

  2. #2
    Join Date
    Sep 2010
    Beans
    898

    Re: Time sync without hardware at GMT

    In my distro (not Ubuntu but a similar one), the hardware clock is set in the script /etc/init.d/hwclock.sh, using the command "hwclock". There are a couple of environment variables that determine whether the option --localtime or --utc is passed to the hwclock command. The manual page for hwclock explains all the parameters.

  3. #3
    Join Date
    Nov 2006
    Location
    Conn., United States
    Beans
    1,644

    Re: Time sync without hardware at GMT

    "When you dual-boot Windows, Windows exists along side of Linux. When you use VirtualBox, Windows exists at the pleasure of Linux." -- ThomasAaron @ System76

  4. #4
    Join Date
    Jul 2008
    Beans
    120
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Time sync without hardware at GMT

    Quote Originally Posted by Dave_L View Post
    In my distro (not Ubuntu but a similar one), the hardware clock is set in the script /etc/init.d/hwclock.sh, using the command "hwclock". There are a couple of environment variables that determine whether the option --localtime or --utc is passed to the hwclock command. The manual page for hwclock explains all the parameters.
    An excellent lead. In ubuntu the magic is in /etc/init/rcS. There is a variable called "UTC" that is set to yes by default, and I set it to no. When I rebooted into windows the time was the same. Wunderbar.

    I thought about the windows registry change, but since windows really isn't made to handle it, who knows what changes would cascade through. Linux has a fine text file to change, and all the programs behave the way they're supposed to! Thanks for all the help.

  5. #5
    Join Date
    Oct 2007
    Location
    Aurora, CO
    Beans
    2,543
    Distro
    Ubuntu

    Re: Time sync without hardware at GMT

    I've attached a .reg file. Simply download it in windows and double-click on it to apply the registry modifications automatically.

    Having the hardware clock on UTC is better for a few reasons. It will mean less modifications to the hardware time in the event of crossing a timezone border, or in the case of daylight savings time. Plus, most operating systems expect the time on the hardware clock to be set to UTC, and not all of them allow you to change it.
    Attached Files Attached Files
    Ian Santopietro - System76 Technical Support.
    Open a Support Ticket!
    Ask a Sales Question!

  6. #6
    Join Date
    Nov 2009
    Location
    de9fdc5c1ade9d205ac5e2622
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Time sync without hardware at GMT

    I would like some independent verification that the .zip file is fine before I use it. No offense, but best to be safe online.

    AlphaA
    "Si Dieu n'existait pas, il faudrait l'inventer" -Voltaire

  7. #7
    Join Date
    Jul 2008
    Beans
    120
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Time sync without hardware at GMT

    Quote Originally Posted by alphaamanitin View Post
    I would like some independent verification that the .zip file is fine before I use it. No offense, but best to be safe online.

    AlphaA
    I fixed it on the linux side and didn't use the zip file.

  8. #8
    Join Date
    Nov 2009
    Location
    de9fdc5c1ade9d205ac5e2622
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Time sync without hardware at GMT

    I also fixed my problem on the linux side.

    AlphaA
    "Si Dieu n'existait pas, il faudrait l'inventer" -Voltaire

  9. #9
    Join Date
    Oct 2008
    Location
    WA
    Beans
    94
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Time sync without hardware at GMT

    Quote Originally Posted by alphaamanitin View Post
    I would like some independent verification that the .zip file is fine before I use it. No offense, but best to be safe online.
    Here is what I did after I saved the file. As you can see, it only contains a short text file; you could apply that registry change yourself if you wanted (I have no idea what it actually does, but I could make some educated guesses based on the replies in this thread). Though I don't know why you would trust me over @isantop, the official System76 representative on this forum!

    Code:
    $ unzip Windows_Time_Fix.zip 
    Archive:  Windows_Time_Fix.zip
      inflating: WindowsTimeFixUTC.reg   
    $ cat WindowsTimeFixUTC.reg 
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
         "RealTimeIsUniversal"=dword:00000001
    $

  10. #10
    Join Date
    Oct 2007
    Location
    Aurora, CO
    Beans
    2,543
    Distro
    Ubuntu

    Re: Time sync without hardware at GMT

    That registry entry controls how Windows interprets the time from the system clock. If it's set to default, Windows assumes the clock is set to your local time. If it's set as in the patch, then it will assume it's set to UTC, which is default for most operating systems other than windows.
    Ian Santopietro - System76 Technical Support.
    Open a Support Ticket!
    Ask a Sales Question!

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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