Thursday, May 16, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 2744  / 3 Years ago, wed, september 8, 2021, 1:55:01

I want to set a custom time in ubuntu 14.04



lets say : 8 OCT 2010 18:00:00



wrkstn@wrkstn-VirtualBox:~$ sudo date --set="8 OCT 2006 18:00:00"
Sun Oct 8 18:00:00 PETST 2006
wrkstn@wrkstn-VirtualBox:~$ date
Fri Sep 2 01:21:51 PETT 2016
wrkstn@wrkstn-VirtualBox:~$


But i am not able to set custom date with Date command.
Please Tell me how can i accomplish this.


More From » 14.04

 Answers
4

If you have set up your computer to automatically synchronize time with an internet time server via NTP (which is the default), you can not edit the system time manually, because ntpd will immediately synchronize it with the internet clock again.



To set the system time and date manually, disable NTP:



sudo timedatectl set-ntp false


Then you can persistently change the time and date, like this:



sudo date -s "2010-1-1 13:00"


If you want automatic internet time synchronization enabled again, run this:



sudo timedatectl set-ntp true

[#13906] Thursday, September 9, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ibuteking

Total Points: 35
Total Questions: 128
Total Answers: 138

Location: Indonesia
Member since Thu, Oct 1, 2020
4 Years ago
;