Monday, February 7, 2011

change Heroku timezone

I had one application hosted at Heroku. A bug was found that several date fields are incorrect. I thought it was something about date time formatting with strftime. but it turned out to be the timezone difference between my development machine and the Heroku instance. Time.now returns different values in these machines.

here is the command to update the Heroku timezone:
heroku config:set TZ=Asia/Hong_Kong

No comments:

Post a Comment