65
32

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.

Herokuのタイムゾーン変更

Posted at

概要

Herokuのタイムゾーン変更手順です。

変更手順

Herokuのタイムゾーンを確認

heroku run bashコマンドでコンソールを表示し、dateコマンドで現在時刻を確認します。

$ heroku run bash
Running bash on ⬢ my-heroku-app... up, run.1234 (Free)
~ $ date
Mon Nov 21 02:35:04 UTC 2016

タイムゾーンの設定と確認

heroku configでタイムゾーンをAsia/Tokyoに設定します。

$ heroku config:add TZ=Asia/Tokyo
Setting TZ and restarting ⬢ my-heroku-app... done, v123
TZ: Asia/Tokyo

タイムゾーンが変更されているか確認します。

$ heroku run bash
Running bash on ⬢ my-heroku-app... up, run.1234 (Free)
~ $ date
Mon Nov 21 11:35:48 JST 2016

変更できました。

参考

65
32
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
65
32

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?