{"id":7880,"date":"2023-01-12T07:18:37","date_gmt":"2023-01-11T22:18:37","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=7880"},"modified":"2023-02-07T05:13:57","modified_gmt":"2023-02-06T20:13:57","slug":"linux%e3%81%a7%e6%99%82%e5%88%bb%e3%81%ae%e7%a2%ba%e8%aa%8d%e3%81%a8%e8%a8%ad%e5%ae%9a%e5%a4%89%e6%9b%b4%e3%82%92%e8%a1%8c%e3%81%86%ef%bc%81%ef%bc%88timedatectl%ef%bc%89","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/7880","title":{"rendered":"Linux\u3067\u6642\u523b\u306e\u8868\u793a\u3068\u5909\u66f4\u3092\u30b3\u30de\u30f3\u30c9\u3067\u884c\u3046\uff01\uff08timedatectl\uff09"},"content":{"rendered":"<p>Linux\u3067timedatectl\u30b3\u30de\u30f3\u30c9\u3067\u3001\u6642\u523b\u306e\u78ba\u8a8d\u3068\u8a2d\u5b9a\u5909\u66f4\u3092\u884c\u3044\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>timedatectl\u306e\u30d8\u30eb\u30d7\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>timedatectl\u30b3\u30de\u30f3\u30c9\u306e\u30d8\u30eb\u30d7\u3092\u8868\u793a\u3057\u3066\u4f7f\u7528\u65b9\u6cd5\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ timedatectl --help\r\ntimedatectl &#x5B;OPTIONS...] COMMAND ...\r\n\r\nQuery or change system time and date settings.\r\n\r\nCommands:\r\n  status                   Show current time settings\r\n  show                     Show properties of systemd-timedated\r\n  set-time TIME            Set system time\r\n  set-timezone ZONE        Set system time zone\r\n  list-timezones           Show known time zones\r\n  set-local-rtc BOOL       Control whether RTC is in local time\r\n  set-ntp BOOL             Enable or disable network time synchronization\r\n\r\nsystemd-timesyncd Commands:\r\n  timesync-status          Show status of systemd-timesyncd\r\n  show-timesync            Show properties of systemd-timesyncd\r\n\r\nOptions:\r\n  -h --help                Show this help message\r\n     --version             Show package version\r\n     --no-pager            Do not pipe output into a pager\r\n     --no-ask-password     Do not prompt for password\r\n  -H --host=&#x5B;USER@]HOST    Operate on remote host\r\n  -M --machine=CONTAINER   Operate on local container\r\n     --adjust-system-clock Adjust system clock when changing local RTC mode\r\n     --monitor             Monitor status of systemd-timesyncd\r\n  -p --property=NAME       Show only properties by this name\r\n  -a --all                 Show all properties, including empty ones\r\n     --value               When showing properties, only print the value\r\n\r\nSee the timedatectl(1) man page for details.\r\n<\/pre>\n<h2>\u73fe\u5728\u306e\u6642\u523b\u3092\u8868\u793a\u3059\u308b\uff01<\/h2>\n<p>timedatectl\u30b3\u30de\u30f3\u30c9\u3067\u73fe\u5728\u306e\u6642\u523b\u3092\u8868\u793a\u3057\u307e\u3059\u3002\u300ctimedatectl status\u300d\u3068\u540c\u3058\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ timedatectl\r\n               Local time: Thu 2023-01-12 07:03:10 JST\r\n           Universal time: Wed 2023-01-11 22:03:10 UTC\r\n                 RTC time: Wed 2023-01-11 22:03:10\r\n                Time zone: Asia\/Tokyo (JST, +0900)\r\nSystem clock synchronized: yes\r\n              NTP service: active\r\n          RTC in local TZ: no\r\n<\/pre>\n<p>show\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u30b7\u30a7\u30eb\u3067\u4f7f\u7528\u3057\u3084\u3059\u3044\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ timedatectl show\r\nTimezone=Asia\/Tokyo\r\nLocalRTC=no\r\nCanNTP=yes\r\nNTP=yes\r\nNTPSynchronized=yes\r\nTimeUSec=Thu 2023-01-12 07:09:55 JST\r\nRTCTimeUSec=Thu 2023-01-12 07:09:55 JST\r\n<\/pre>\n<h2>\u6642\u523b\u3092\u8a2d\u5b9a\u3057\u3088\u3046\u3068\u3057\u3066\u307f\u308b\uff01<\/h2>\n<p>\u6642\u523b\u540c\u671f\u3092\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u30b3\u30de\u30f3\u30c9\u304b\u3089\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo timedatectl set-time &quot;2023-01-12 08:09:49 JST&quot;\r\nFailed to set time: Automatic time synchronization is enabled\r\n<\/pre>\n<h2>\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30af\u30ed\u30c3\u30af\u3092\u30ed\u30fc\u30ab\u30eb\u6642\u9593\u6271\u3044\u306b\u8a2d\u5b9a\u3057\u3066\u307f\u308b\uff01<\/h2>\n<p>Windows\u306e\u3088\u3046\u306b\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u30af\u30ed\u30c3\u30af\u3092\u30ed\u30fc\u30ab\u30eb\u6642\u9593\u6271\u3044\u306b\u8a2d\u5b9a\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,9]; title: ; notranslate\" title=\"\">\r\n$ sudo timedatectl set-local-rtc 1\r\nusradmin@dpc001p1:~$ sudo timedatectl \r\n               Local time: Thu 2023-01-12 20:36:11 JST\r\n           Universal time: Thu 2023-01-12 11:36:11 UTC\r\n                 RTC time: Thu 2023-01-12 20:36:11\r\n                Time zone: Asia\/Tokyo (JST, +0900)\r\nSystem clock synchronized: yes\r\n              NTP service: active\r\n          RTC in local TZ: yes\r\n\r\nWarning: The system is configured to read the RTC time in the local time zone.\r\n         This mode cannot be fully supported. It will create various problems\r\n         with time zone changes and daylight saving time adjustments. The RTC\r\n         time is never updated, it relies on external facilities to maintain it.\r\n         If at all possible, use RTC in UTC by calling\r\n         'timedatectl set-local-rtc 0'.\r\n<\/pre>\n<p>timedatectl\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3059\u308b\u3068\u3001\u304a\u3059\u3059\u3081\u3067\u306a\u3044\u65e8\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3059\u3050\u623b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3092\u5909\u66f4\u3059\u308b\uff01<\/h2>\n<p>\u5909\u66f4\u53ef\u80fd\u306a\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,9]; title: ; notranslate\" title=\"\">\r\n$ timedatectl list-timezones \r\nAfrica\/Abidjan\r\nAfrica\/Accra\r\nAfrica\/Addis_Ababa\r\n...\r\n<\/pre>\n<p>\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,9]; title: ; notranslate\" title=\"\">\r\n$ sudo timedatectl set-timezone Africa\/Abidjan\r\nusradmin@dpc001p1:~$ timedatectl\r\n               Local time: Thu 2023-01-12 11:43:57 GMT\r\n           Universal time: Thu 2023-01-12 11:43:57 UTC\r\n                 RTC time: Thu 2023-01-12 11:43:57\r\n                Time zone: Africa\/Abidjan (GMT, +0000)\r\nSystem clock synchronized: yes\r\n              NTP service: active\r\n          RTC in local TZ: no\r\n<\/pre>\n<p>RHEL\u7cfb\u306f\u3001\u300c\/etc\/localtime\u300d\u306e\u30ea\u30f3\u30af\u5148\u304c\u5909\u66f4\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo ls -l \/etc\/localtime\r\nlrwxrwxrwx. 1 root root 36 Jan 12 11:46 \/etc\/localtime -&gt; ..\/usr\/share\/zoneinfo\/Africa\/Abidjan\r\n<\/pre>\n<p>Debian\u7cfb\u306f\u3001\u300c\/etc\/timezone\u300d\u30d5\u30a1\u30a4\u30eb\u306e\u5185\u5bb9\u304c\u5909\u66f4\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ cat \/etc\/timezone \r\nAfrica\/Abidjan\r\n<\/pre>\n<p>timedatectl\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3068Linux\u306e\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u5dee\u7570\u3092\u5438\u53ce\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>timedatectl\u30b3\u30de\u30f3\u30c9\u3067\u306f\u3001\u6642\u523b\u5468\u308a\u306e\u8a2d\u5b9a\u3092\u4e00\u62ec\u3057\u3066\u5909\u66f4\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002date\u30b3\u30de\u30f3\u30c9\u306e\u4ee3\u308f\u308a\u306b\u4f7f\u7528\u3059\u308b\u306e\u3082\u3088\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/8621\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u306e\u8d77\u52d5\u3068\u505c\u6b62\u3092Systemd\u3067\u5236\u5fa1\u3059\u308b\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2021\/02\/fi_linux_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u306e\u8d77\u52d5\u3068\u505c\u6b62\u3092Systemd\u3067\u5236\u5fa1\u3059\u308b\uff01<\/div><div class=\"substr\">Systemd\u3067Linux\u306e\u8d77\u52d5\u3068\u505c\u6b62\u3092\u5236\u5fa1\u3059\u308b\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/7679\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2021\/02\/fi_linux_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011Linux\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01<\/div><div class=\"substr\">Linux\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<h2>\u95a2\u9023\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<p><a href=\"https:\/\/amzn.to\/3H5qkUu\" rel=\"noopener\" target=\"_blank\"><img decoding=\"async\" class=\"paapi5-pa-product-image-source lazyload\" data-src=\"https:\/\/m.media-amazon.com\/images\/I\/51ZPkoBGdZL._SL160_.jpg\" alt=\"N\/A\"><\/a><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u3067timedatectl\u30b3\u30de\u30f3\u30c9\u3067\u3001\u6642\u523b\u306e\u78ba\u8a8d\u3068\u8a2d\u5b9a\u5909\u66f4\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":5527,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[125],"tags":[],"class_list":["post-7880","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-systemd"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=7880"}],"version-history":[{"count":0,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/7880\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/5527"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=7880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=7880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=7880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}