How to set datetime in Linux system by command line

Yesterday, I found problem about date&time system on Linux server virtual machine on VMServer. That virtual machine has shifted time by automatic and this is example how to use command line set date&time in Linux server. If you want to set current date&time to January 30, 2008 22:56:42 , you can use this command.

# date 013022562008.42

But I think, this is not good solution for fix this problem, it should be used synchronize time by NTP(Network Time Protocol) server .
Why does virtual machine on vmware shift time?

And this is answer.

0 0 votes
Article Rating
Inline Feedbacks
View all comments
14 years ago

You should use synchronize time by NTP because it’s forced on the law.

14 years ago

Ohh , really. I don’t know that.
Thank, krub. 😀