Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
96
Help us understand the problem. What is going on with this article?
@zaki-lknr

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:~# 
96
Help us understand the problem. What is going on with this article?
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
zaki-lknr
メール系のインフラからweb系バックエンド(Perl)・組み込み(C)・業務系BREW(C)/Android(Java)アプリとか雑食性でした。最近はAnsibleとKubernetesが好物
ap-com
エーピーコミュニケーションズ(APC)は、ITインフラ自動化のプロフェッショナルとして、お客様の課題解決のためにAzure Kubernetes ServiceやAnsibleなどを用いたクラウドネイティブ環境の内製化・自動化支援や、システムインテグレーションを行うと共に、「エンジニアから時間を奪うものをなくす」ためのプロダクト・サービスを提供するNeoSIer(ネオエスアイヤー)です。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
96
Help us understand the problem. What is going on with this article?