I need to have the display time of my application in the local time zone. Locally, I use Time.zone = "Athens" in application.rb and it works fine.
For Heroku, I used "heroku config: add TZ = Europe / Athens". This works fine for every operation I do from the command line, but this does not apply to my application.
for instance
hero launch date : Launch date connected to the terminal ... up, launch .4786 Tue 23 Apr 15:13:51 EEST 2013
heroku launch console :
Order.last.created_at => Tue, April 23, 2013 13:15:53 ββEEST +03: 00
Time.zone => (GMT + 02: 00) Athens
But I put this in my tracks: <% = Time.zone%> And I understand: (GMT + 00: 00) UTC And my times appear in UTC in a real application.
So, how to set the time zone for a real rail application on heroku (and not just on the console).
source share