Set the created_at to local time zone. I deployed my app in heroku. But while creating creating record created_at is taking heroku time but not local time. For example: in heroku time is: 26-06-2015 but in my local machine time is: 25-06-2015
I want to store my local machine time not heroku time. I tried to put the below code in application.rb
config.time_zone = 'Eastern Time (US & Canada)'
config.active_record.default_timezone = :local
But not working. Can anyone help me out of this
答案 0 :(得分:1)
答案 1 :(得分:0)
To set time zone on the Heroku server, you will need this:
$ heroku config:add TZ="America/New_York"
Credit goes here.