3

I set the the time using, e.g.

sudo date --set="24 MAY 2013 18:00:00"
sudo hwclock --systohc --utc

This worked, but upon reboot the time was back to the old value. What am I doing wrong? I thought hwclock would make it permanent.

I notice in the gui time/date my timezone is still set to a different timezone and Network Time is set to on. So I wonder if it's somehow autosyncing, or if I need also change the time zone at terminal?

5
  • Where are you? Are you set your Time Zone correctly? Double check it ;) May 25, 2013 at 11:39
  • The time-zone is currently set to Europe/Paris, I want it set to London time. As I mention in the OP, I haven't tried setting the time-zone at all from the terminal, I was just trying to set to time manually with the date command (which worked but didn't stay after reboot). Are you suggesting that I also need to somehow adjust the time-zone from terminal too?
    – fpghost
    May 25, 2013 at 11:46
  • Does time-zone take precedence over the time set via date?
    – fpghost
    May 25, 2013 at 11:48
  • 1
    @fpghost... Certainly! May 25, 2013 at 11:49
  • @fpghost... Ubuntu will update Date/Time using your location info. Therefore Date/Time will be updated on booting operation or some period of time according to your location(TimeZone) using internet services. May 25, 2013 at 11:53

2 Answers 2

8

To choose your system time zone from a terminal:

sudo dpkg-reconfigure tzdata
0

you can do this:

sudo apt update
sudo apt install ntpdate
sudo ntpdate [a ntp server like: time.windows.com]
crontab -e -u [your user name]

add following job in crontab:

@reboot ntpdate time.windows.com

save the cron file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .