Clock displays incorrect time

26,421

Solution 1

I've finally found the solution. I had to edit my ~/.profile and replace TZ='America/Chicago' with my own timezone. After making the change, logging out and logging back in, the time displayed is now correct.

Solution 2

You can use the GUI in the time and date preferences to set your timezone and then be sure to run this command in the terminal:

sudo ntpdate ntp.ubuntu.com

This will ensure that your machine polls the ubuntu server to get the right time and date for your timezone.

To verify, type

date    

in the terminal.

Solution 3

Today I stayed an hour longer at work because the KDE clock widget showed the wrong time. The evening guard had a great laugh! :) Time and Date setting themselves are OK, auto adjust set and set to NTP pool. On the command line date is OK as well...

Turns out it's in the widget settings itself:

  • Rightclick on clock widget and select 'Digital Clock Settings'
  • Choose 'Time Zone': both UTC and your local timezone (Amsterdam in my case) should be selected... but here's the crunch:
  • Below 'Clock default to' was set to UTC; changed this to my timezone and applied.

Voila!

Solution 4

First, ensure that you have the right time zone set. Open the app "Time and Date" and click the little Lock icon and input your password to unlock, at which point you can set your time zone.

Second, open a Terminal and input this command: sudo apt-get install ntp

Restart your computer and check the time by going to this website: time.is

Solution 5

Under Xubuntu, you may need to remove the clock widget or clock 'element', then put it back.

This solved my problem of clock displaying UTC time instead of local time.

Share:
26,421

Related videos on Youtube

elbear
Author by

elbear

I build web sites with Django. I explore data with pandas. I manage my own servers and provision them with Ansible. I'm interested in functional programming. Technologies I've experimented with or want to experiment include Haskell, Purescript, Nix package manager.

Updated on September 18, 2022

Comments

  • elbear
    elbear over 1 year

    I've just installed 64-bit Ubuntu 11.04 and after I updated it, the clock stopped displaying the right time. It's now 8 hours behind my normal time. I've checked the Time and Date settings and the Location field is correct. What's even weirder is that the time displayed in Time and Date Settings adjusts itself after a few seconds and is correct. The time displayed in the task bar remains the same, however.

    Any ideas?

  • elbear
    elbear over 12 years
    I did all that and, even though time.is displays the correct time in my timezone, the time displayed on my computer is still 8 hours behind.
  • friederbluemle
    friederbluemle over 10 years
    I tried the ntpdate command and I'm getting this: ntpdate[26581]: no server suitable for synchronization found
  • epsilone
    epsilone over 9 years
    I can not find any TZ='whatever' in my ~/.profile.
  • michael meyer
    michael meyer almost 9 years
    @friederbluemle try again after some time. :)
  • Gabbax0r
    Gabbax0r about 7 years
    this works for me. thank you. never thought it would be the widget that displays the time incorrect.