2

I need to change system time and date on my xubuntu to do some QA testing does anyone know how to do it? I tried going into system manager -> time and date setting every time i change the time it keeps going back to current time.

  • none of the suggestion works for me – Nanda Christanto Nov 21 at 3:27
  • 1/ Disable automatic date& time 2/ Run the date command in a terminal – cmak.fr Nov 21 at 3:50
1

This works for me on Ubuntu 18.04

  • Disable the NTP server

    sudo timedatectl set-ntp false
    sudo timedatectl set-time "2019-12-30 $(date +%R:%S)"
    
  • The result.

    emmet@ansmachine:~$ date
    Mon Des 30 05:08:21 CET 2019
    emmet@ansmachine:~$ date
    Mon Des 30 05:08:22 CET 2019
    emmet@ansmachine:~$ date
    Mon Des 30 05:08:23 CET 2019
    

    If you want to go back to original dates (pre-changes), just enable the NTP once again.

    sudo timedatectl set-ntp true
    
1

solve it. I had to install the ntp setting first to prevent the system to automatically change time and date.

sudo apt-get install ntp

unlock the date system -> change to manual -> then it works

Not the answer you're looking for? Browse other questions tagged or ask your own question.