0
0

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 1 year has passed since last update.

AlmaLinux9.0でタイムゾーンを変更

Last updated at Posted at 2022-11-30

AlmaLinux9.0で時刻同期が出来ていなかったので調べたらタイムゾーンがアメリカのニューヨーク設定だった為、日本の東京に設定変更した時のメモ。

rsyncでスクリプトを自動実行させようとしたが、設定した時刻にスクリプトが走らない。
時刻を確認したら、微妙にずれている…。

# date
2022年 11月 29日 火曜日 21:12:57 EST

時刻同期されているか確認すると、ニューヨークの時間になっていた。

# timedatectl
               Local time: 火 2022-11-29 21:17:23 EST
           Universal time: 水 2022-11-30 02:17:23 UTC
                 RTC time: 水 2022-11-30 02:17:23
                Time zone: America/New_York (EST, -0500)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

タイムゾーンを東京に変更

# timedatectl set-timezone Asia/Tokyo

Chronyを再起動。

# systemctl restart chronyd

再度確認すると、タイムゾーンが東京に変更されている。

# timedatectl
               Local time: 水 2022-11-30 11:19:00 JST
           Universal time: 水 2022-11-30 02:19:00 UTC
                 RTC time: 水 2022-11-30 02:19:00
                Time zone: Asia/Tokyo (JST, +0900)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

時刻も同期された。

# date
2022年 11月 30日 水曜日 11:41:37 JST
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?