Unable to change date and time settings in Ubuntu 16.04 using command line
22,569
You can use timedatectl
, it does all the necessary things for you itself.
First make sure NTP is not enabled:
sudo timedatectl set-ntp 0
then set the time:
sudo timedatectl set-time "2017-05-30 18:17:16"
make sure your timezone is correct too, e.g:
sudo timedatectl set-timezone Europe/Paris
and also use UTC if you are using localtime:
sudo timedatectl set-local-rtc 0
Related videos on Youtube
Author by
mrudula
Updated on September 18, 2022Comments
-
mrudula over 1 year
I have tried below commands to change date and time but these are not updating date and time.
sudo date --set="2015-09-30 10:05:59.990" sudo date --set="Tue 30 May 2017 15:00:00" sudo hwclock --systohc
Kindly provide valid commands for changing date and time
-
Ryan Arief almost 4 yearsthe sudo timedatectl set-ntp 0 helps me