&1 | grep Date: | cut -d' ' -f5-8)Z"" />

Vannkorn

Full Stack WordPress Developer

Close

Set Date/Time Automatically from Google on Ubuntu 18

Wrong date/time setting on your server can fail some of the important tasks. I've marked this post just a quick command for future usage.

Ads: Register now via this link to receive $100 credit from Vultr

I’ve once had a problem on one of my Ubuntu 18 servers on timing not syncing from the internet.

Use the following command:

sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"

Leave a Reply

Your email address will not be published. Required fields are marked *