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.
Asked
Active
Viewed 2,328 times
6
-
none of the suggestion works for me – Nanda Christanto Nov 21 '19 at 03:27
-
1/ Disable automatic date& time 2/ Run the date command in a terminal – cmak.fr Nov 21 '19 at 03:50
2 Answers
5
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

Liso
- 15,377
- 3
- 51
- 80
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