0
2

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.

[Centos7]TimeZone設定を変えたあとはサーバを再起動しよう

Posted at

次回サーバ設定するときの備忘として残す

TimeZoneを「Asia/Tokyo」に設定

CentOS7でTimeZone設定を「Asia/Tokyo」に設定した

$ sudo timedatectl set-timezone Asia/Tokyo

cronで1日1,2回動かしたいスクリプトを設定し、
「/var/log/cron」を確認したところ、cronの実行時刻がUTCのままだった

サーバを再起動

$ sudo systemctl reboot

再起動後「/var/log/cron」を確認したら、JSTで動いてた!

ちなみに:cronサービスを再起動

$ sudo systemctl restart crond

GCEでCentOSを動かしているのだが、crondの再起動ではUCTのまま動き続けていた

0
2
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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?