Time set through terminal resets after reboot

7,655

To choose your system time zone from a terminal:

sudo dpkg-reconfigure tzdata
Share:
7,655

Related videos on Youtube

fpghost
Author by

fpghost

Updated on September 18, 2022

Comments

  • fpghost
    fpghost over 1 year

    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?

    • S.M.Mousavi
      S.M.Mousavi almost 11 years
      Where are you? Are you set your Time Zone correctly? Double check it ;)
    • fpghost
      fpghost almost 11 years
      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
      fpghost almost 11 years
      Does time-zone take precedence over the time set via date?
    • S.M.Mousavi
      S.M.Mousavi almost 11 years
      @fpghost... Certainly!
    • S.M.Mousavi
      S.M.Mousavi almost 11 years
      @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.