{"id":8543,"date":"2020-08-28T13:16:27","date_gmt":"2020-08-28T05:16:27","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8543"},"modified":"2020-08-28T13:16:27","modified_gmt":"2020-08-28T05:16:27","slug":"timedatectl","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/timedatectl","title":{"rendered":"timedatectl\u547d\u4ee4 – \u63a7\u5236\u7cfb\u7edf\u65f6\u95f4\u548c\u65e5\u671f"},"content":{"rendered":"\n

timedatectl \u53ef\u4ee5\u7528\u6765\u67e5\u8be2\u548c\u66f4\u6539\u7cfb\u7edf\u65f6\u949f\u53ca\u5176\u8bbe\u7f6e\u3002<\/p>\n\n\n\n

\u4f7f\u7528 systemd-firstboot(1) \u6765\u521d\u59cb\u5316\u5df2\u6302\u8f7d(\u4f46\u672a\u542f\u52a8)\u7684\u7cfb\u7edf\u955c\u50cf\u7684\u7cfb\u7edf\u65f6\u533a\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>timedatectl [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

status<\/td>\u663e\u793a\u5f53\u524d\u65f6\u95f4\u8bbe\u7f6e<\/td><\/tr>
set-time TIME<\/td>\u8bbe\u7f6e\u7cfb\u7edf\u65f6\u95f4<\/td><\/tr>
set-timezone ZONE<\/td>\u8bbe\u7f6e\u7cfb\u7edf\u65f6\u533a<\/td><\/tr>
list-timezones<\/td>\u663e\u793a\u5df2\u77e5\u65f6\u533a<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u67e5\u770b\u5f53\u524d\u7684\u65f6\u533a\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# timedatectl status<\/pre>\n\n\n\n

\u8bbe\u7f6e\u7cfb\u7edf\u65e5\u671f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# timedatectl set-time 2020-08-20<\/pre>\n\n\n\n

\u67e5\u770b\u6240\u6709\u7684\u65f6\u533a\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# timedatectl list-timezones<\/pre>\n\n\n\n

\u8bbe\u7f6e\u65f6\u533a\u4e3a\u4e1c\u516b\u533a\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# timedatectl list-timezones | grep \"Asia\/S\"<\/pre>\n","protected":false},"excerpt":{"rendered":"

timedatectl \u53ef\u4ee5\u7528\u6765\u67e5\u8be2\u548c\u66f4\u6539\u7cfb\u7edf\u65f6\u949f\u53ca\u5176\u8bbe\u7f6e\u3002 \u4f7f\u7528 systemd-firstboot(1) […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8543"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=8543"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8543\/revisions"}],"predecessor-version":[{"id":8553,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8543\/revisions\/8553"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}