Results 1 to 6 of 6

Thread: System time incorrect

  1. #1
    Join Date
    Nov 2012
    Beans
    32

    Question System time incorrect

    I have a dual-booting system for switching between Windows and Ubuntu. I recently switched to Windows and back, and now my system clock in Ubuntu is incorrect. It is currently 7pm, but it displays 2pm. I don't want to set it manually, and I can't see how to make it update to the correct time.

    How can I fix this?

    It would also be nice if anyone could explain how to prevent this from happening again. In Windows I can easily tell it to update the time if it's off, but I don't know how to make sure it doesn't happen in Ubuntu anymore.

  2. #2
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: System time incorrect

    It's been a while since I've been faced with a similar dilemma, so I might have forgotten something, but here goes anyway:

    If you're using a "standard" Ubuntu installation, you can click on the date on the top task bar, then Time and date settings. From there, you'll should be able to find an option to set the date and time automatically from the internet.
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  3. #3
    Join Date
    Jul 2007
    Location
    Tāmaki Makau-rau, NZ
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: System time incorrect

    This sounds to me like the "BIOS clock set to UTC" issue.

    If you look at /etc/default/rcS, do you see the following?

    Code:
    # assume that the BIOS clock is set to UTC time (recommended)
    UTC=yes
    That's recommended when you're running Linux only, but causes problems if you're using Windows as well. Windows assumes that the BIOS clock is set to local time.

    Edit /etc/default/rcS and replace the "yes" with "no". You'll need to do this as root.

    You may need to reboot before resetting the time.
    BACKUPS are unsexy — until you discover you should have done one yesterday.
    Spare your nerves and do one before you upgrade or install.

  4. #4
    Join Date
    Nov 2012
    Beans
    32

    Re: System time incorrect

    Quote Originally Posted by Irihapeti View Post
    This sounds to me like the "BIOS clock set to UTC" issue.

    If you look at /etc/default/rcS, do you see the following?

    Code:
    # assume that the BIOS clock is set to UTC time (recommended)
    UTC=yes
    That's recommended when you're running Linux only, but causes problems if you're using Windows as well. Windows assumes that the BIOS clock is set to local time.

    Edit /etc/default/rcS and replace the "yes" with "no". You'll need to do this as root.

    You may need to reboot before resetting the time.
    It was set to UTC=yes, so I changed it to UTC=no as you suggested. But after reboot, it still shows the incorrect time. Is there a way I can force it to recheck? Or might the problem be something else?

  5. #5
    Join Date
    Nov 2012
    Beans
    32

    Re: System time incorrect

    Is it possible my firewall could be the problem? I have it setup in a particular way, and it might be blocking communication with the necessary servers.

    EDIT: Yes, that appears to have been the problem. After temporarily disabling it and running the following command, the time corrected itself:
    Code:
    ntpdate time.nist.gov
    Last edited by Kestreln8144; August 14th, 2013 at 03:06 AM.

  6. #6
    Join Date
    Jul 2007
    Location
    Tāmaki Makau-rau, NZ
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: System time incorrect

    Glad to hear that it's working.

    The port for ntp is UDP 123. You can set up your firewall to allow that.
    BACKUPS are unsexy — until you discover you should have done one yesterday.
    Spare your nerves and do one before you upgrade or install.

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
  •