Follow this Blog!

Hi Everyone, f Comment

I am Michael. I blog about helpful tips, anything from technical (e.g. how to remove computer virus ) to hobbies (e.g. how to solve the rubik's cube ) to my favorite crafts like how to make an origami swan that may help you solve an issue you've long had or simply inspired you to enjoy life more!

Google has been a great friend to me for helping me find solutions to my problems, but it is not omnipotent. Quite often I just cannot find the solution regardless of how I tweak the search query. It is frustrating and disappointing.

When that happens it doesn't mean that the solution does not exist. It may mean that it exists but for some reason you cannot find it on Google or any other search engine.

To that end I try to make every one of my blogs search engine friendly so that you have the best chance of finding useful information. This is the purpose behind!

Feel free to leave a comment in the comment box below each post!

Check below for my latest posts!

Sep 18, 2018

Unix: How do you correct the system date and time WITHOUT manually entering the date and time?
Amazon Suppose your Unix machine's system time is wrong. How do you correct it? How do you automatically set your Unix server's system time to the correct global clock so you don't need to manually key in the correct time? In other words, how do you set the Unix system date and time correctly in a non-manual way? Let's find out.

First, you run the command date to show the current date and time on your Linux machine:

# date
Wed Sep 19 10:11:01 CST 2018

It's wrong; the correct time should be 10:16. It's five minutes behind.

You run the following command to show the hardware date and time:

# hwclock --show
Wed 19 Sep 2018 10:16:34 AM CST -1.010401 seconds

It turns out that the hardware date and time is correct! So you'd like to synchronize system time to hardware clock on your Linux box. In other words, you want to set the system time to the hardware clock.

Here's the command:

# hwclock --hctosys

Run date again immediately to see the time change:

# date
Wed Sep 19 10:17:01 CST 2018

Shortly, run date again to make sure the clock is really running!

# date
Wed Sep 19 10:17:14 CST 2018

Luckily our hardware date and time on the Unix box is correct. Suppose it is wrong, what do you do? If this happens to me, let me know and I'll find a solution for you.

Questions? Let me know!
Please leave a comment here!
One Minute Information - by Michael Wen
Find Michael on Google or Facebook
ADVERTISING WITH US - Direct your advertising requests to Michael