7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

systemdでのタイムゾーン設定

Posted at

timedatectl

systemdパッケージにtimedatectlというツールが含まれているのでコレが使える。

$ rpm -ql systemd-208-11.el7_0.5.x86_64 | grep timedatectl
/usr/bin/timedatectl
/usr/share/bash-completion/completions/timedatectl
/usr/share/man/man1/timedatectl.1.gz
/usr/share/zsh/site-functions/_timedatectl

現在の設定を表示

$ timedatectl status
      Local time: 金 2015-01-09 13:23:25 JST
  Universal time: 金 2015-01-09 04:23:25 UTC
        Timezone: Asia/Tokyo (JST, +0900)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a

設定可能なタイムゾーンのリスト

$ timedatectl list-timezones | head
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre

head しなければもっとずらずら出てきます。

タイムゾーンをバンコクに設定

$ sudo timedatectl set-timezone Asia/Bangkok
$ timedatectl status
      Local time: 金 2015-01-09 11:27:59 ICT
  Universal time: 金 2015-01-09 04:27:59 UTC
        Timezone: Asia/Bangkok (ICT, +0700)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a

日本向けには Asia/Tokyo を設定すればOKだと思います。

7
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?