{"id":419,"date":"2021-11-07T04:13:32","date_gmt":"2021-11-07T02:13:32","guid":{"rendered":"http:\/\/catyellow.net\/blog\/?p=419"},"modified":"2021-11-07T04:21:21","modified_gmt":"2021-11-07T02:21:21","slug":"how-to-update-system-time-w-o-ntpdate","status":"publish","type":"post","link":"https:\/\/catyellow.net\/blog\/?p=419","title":{"rendered":"How to update system time w\/o ntpdate"},"content":{"rendered":"<p>Recently I tried to update time on the server and there was no way to use <strong>ntpdate<\/strong> because it was blocked and update raised the following error:<\/p>\r\n\r\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n&lt;p&gt;ntpdate pool.ntp.org 6 Nov 21:18:08 ntpdate[23312]: no server suitable for synchronization found&lt;\/p&gt;\r\n<\/pre>\r\n\r\n<p>I used this trick to workaround the issue:<\/p>\r\n\r\n<code>date; date -s \"$(wget -qSO- --max-redirect=0 google.com 2&gt;&amp;1 | grep Date: | cut -d' ' -f5-8)Z\"; date<\/code>","protected":false},"excerpt":{"rendered":"<p>Recently I tried to update time on the server and there was no way to use ntpdate because it was blocked and update raised the following error: I used this trick to workaround the issue: date; date -s &#8220;$(wget -qSO- &#8211;max-redirect=0 google.com 2&gt;&amp;1 | grep Date: | cut -d&#8217; &#8216; -f5-8)Z&#8221;; date<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[71,70],"_links":{"self":[{"href":"https:\/\/catyellow.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/419"}],"collection":[{"href":"https:\/\/catyellow.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/catyellow.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/catyellow.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/catyellow.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=419"}],"version-history":[{"count":6,"href":"https:\/\/catyellow.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/419\/revisions"}],"predecessor-version":[{"id":425,"href":"https:\/\/catyellow.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/419\/revisions\/425"}],"wp:attachment":[{"href":"https:\/\/catyellow.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/catyellow.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/catyellow.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}