2

I'm installing ubuntu 12.04. On the time/date settings, I tried to click on Seattle (where I am), but it only registered Vancouver. I modified the ntp config files to use the north american pool, if that matters. On the time/date dialog, I have "Automatically from the internet" checked.

The time value it shows is 7 hours before the current time.

Another minor issue is that the date it shows is apparently using the non-us format (yy-mm-dd). I'm ok with that last issue if that's the default, but the time being 7 hours off is definitely a problem.

What am I missing?

Jorge Castro
  • 71,754

3 Answers3

5

What am I missing?

Hello fellow Pacific Daylight Timer! :) Your system clock is defaulting to UTC (aka GMT), which is PDT+7.

Start the terminal with Ctrl-Alt-T, run sudo dpkg-reconfigure tzdata, and select the appropriate city in North America from the menu. Then exit. That should do it!

ish
  • 139,926
  • What is the point of starting the terminal with "ctrl-alt-t"? is that just a shortcut for starting a terminal? – David M. Karr May 23 '12 at 16:22
  • When I completed that, it said that the default timezone is "america/vancouver". Local time is 2:20 PDT and universal time is 9:20 UTC. The current local time is actually 9:20. Right after doing this, I brought up the settings dialog, and it still says the time is 2:20. – David M. Karr May 23 '12 at 16:24
  • Make sure tzdata time zone and the zone you select graphically in Time and Date are the same... – ish May 23 '12 at 16:33
  • I don't know exactly what you're suggesting to compare. – David M. Karr May 23 '12 at 19:35
3

To fix incorrect time on my HP6910P:

  1. I set 'UTC=no' in /etc/default/rcS
  2. Then set my timezone in System settings -> Time & Date
  3. Then shutdown and reset the local time in my BIOS.
    Which had been decreased 5 hrs (I am UTC-5, Ubuntu was trying to do me a favor when I set the timezone, but instead messed up my BIOS local time which is used by Windows).

  4. Then Ubuntu 12.04 displayed the correct time.

mikewhatever
  • 32,638
user218140
  • 31
  • 1
2

It sounds like your time is wrong 7 hours the other way. When I've had that it has been because the basic clock on my computer, which is supposed to be set to the UTC time and then adjusted by the timezone mechanism, was set to local time and the timezone mechanism was adjusting my time to a later time.

While ntp should be setting the basic clock on your computer to UTC time, it will refuse to adjust it if its not close, and 7 hours is nothing like close.

I'd suggest that you set time clock to utc simply by issuing the ntpdate command. You may also be able to set the time manually if you can get it correct within a second or maybe two.

John S Gruber
  • 13,336
  • When I ran ntpdate, it said this: "ntpdate[455]: no servers can be used, exiting". I had earlier changed "/etc/ntp.conf", replacing the default servers with the following: server 0.north-america.pool.ntp.org server 1.north-america.pool.ntp.org server 2.north-america.pool.ntp.org server 3.north-america.pool.ntp.org – David M. Karr May 23 '12 at 19:41
  • Did you stop the ntp daemon and run it as sudo ntpdate 3.north-america.pool.ntp.org? Then restart the ntp daemon? ntpdate doesn't seem to use the ntp daemon's /etc/ntp.conf file. After stopping the ntp daemon I copied each and pasted into the above command and each works from here. If that doesn't work you may have a network configuration problem. – John S Gruber May 23 '12 at 20:17
  • $ sudo service ntp stop
    • Stopping NTP server ntpd [ OK ]

    $ sudo ntpdate 3.north-america.pool.ntp.org 23 May 07:18:52 ntpdate[9801]: no server suitable for synchronization found

    – David M. Karr May 23 '12 at 21:19
  • That sounds like a separate problem. To resolve this one maybe it would be better to try to set the time by hand. ... – John S Gruber May 23 '12 at 22:03
  • For your error message from ntpdate please see http://askubuntu.com/questions/49401/unable-to-sync-time-using-ntpdate-error-no-server-suitable-for-synchronizat – John S Gruber May 23 '12 at 22:07
  • I've added another possible answer to the linked question about "no server suitable for synchronization". – John S Gruber May 23 '12 at 22:52
  • For now, I manually set the time on the time/date settings dialog, then changed it back to automatic. We'll see what happens over time. I suppose there should be ntp logs that tell me whether it's successfully checking for updates. I guess I'll have to check those. – David M. Karr May 25 '12 at 15:19
  • ntp should be updating the /var/lib/ntp/ntp.drift file. If you woud like actual logs to check you can enable them in the /etc/ntp.conf file. – John S Gruber May 25 '12 at 16:35