52
50

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

heorkuでタイムゾーン設定

heroku側の設定で東京(UTC+9:00)にする

手順

  • 9時間ずれている状態を確認
    • heroku console が動かない場合は heroku run console を実行する
$ heroku run console
Running `console` attached to terminal... up, run.3685
Loading production environment (Rails 4.0.0.beta1)
irb(main):001:0> Time.now
=> 2013-05-04 15:53:31 +0000
  • タイムゾーンを東京(UTC+9:00)に設定
$ heroku config:add TZ=Asia/Tokyo
Setting config vars and restarting xxxxxxx...
done, v59
TZ: Asia/Tokyo
  • タイムゾーンが東京(UTC+9:00)になっていることを確認する
$ heroku run console
Running `console` attached to terminal... up, run.5395
Loading production environment (Rails 4.0.0.beta1)
irb(main):001:0> Time.now
=> 2013-05-05 00:54:25 +0900

参考

52
50
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
52
50

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?