Help us understand the problem. What is going on with this article?

ubuntu 18.04 時刻とタイムゾーン設定

More than 1 year has passed since last update.

タイムゾーンの設定

18.04新規インストール時はデフォルトではUTCになっていて9時間ずれていたので設定する。

(というか、OSインストール時にタイムゾーンを設定するタイミングがなかったような…)

root@epoisses:~# date
Sat Oct 20 01:07:35 UTC 2018
root@epoisses:~# timedatectl
                      Local time: Sat 2018-10-20 01:07:58 UTC
                  Universal time: Sat 2018-10-20 01:07:58 UTC
                        RTC time: Sat 2018-10-20 01:07:59
                       Time zone: Etc/UTC (UTC, +0000)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no
root@epoisses:~# timedatectl list-timezones | grep -i tokyo
Asia/Tokyo

設定

root@epoisses:~# timedatectl set-timezone Asia/Tokyo
root@epoisses:~# timedatectl
                      Local time: Sat 2018-10-20 10:09:15 JST
                  Universal time: Sat 2018-10-20 01:09:15 UTC
                        RTC time: Sat 2018-10-20 01:09:16
                       Time zone: Asia/Tokyo (JST, +0900)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no
root@epoisses:~# date
Sat Oct 20 10:09:18 JST 2018
root@epoisses:~#

時刻の設定

メモが残ってたので張り付けておく。。

root@cheddar:~# timedatectl set-time "2018-08-15 07:20:00"
Failed to set time: Automatic time synchronization is enabled
root@cheddar:~# timedatectl status
                      Local time: Wed 2018-08-15 16:21:29 JST
                  Universal time: Wed 2018-08-15 07:21:29 UTC
                        RTC time: Wed 2018-08-15 07:21:28
                       Time zone: Asia/Tokyo (JST, +0900)
       System clock synchronized: no
systemd-timesyncd.service active: yes
                 RTC in local TZ: no
root@cheddar:~# timedatectl set-ntp no
root@cheddar:~# timedatectl set-time "2018-08-15 07:22:00"
root@cheddar:~# timedatectl set-ntp yes
root@cheddar:~# timedatectl status
                      Local time: Wed 2018-08-15 07:22:04 JST
                  Universal time: Tue 2018-08-14 22:22:04 UTC
                        RTC time: Tue 2018-08-14 22:22:05
                       Time zone: Asia/Tokyo (JST, +0900)
       System clock synchronized: no
systemd-timesyncd.service active: yes
                 RTC in local TZ: no
root@cheddar:~# 
zaki-lknr
メール系のインフラからweb系バックエンド(Perl)・組み込み(C)・業務系BREW(C)/Android(Java)アプリとか雑食性。最近はOpenShiftとAnsible
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした