0

I have a rails app running in heroku and I believe the application runs on UTC time so when my small set of users create a Report the created_at timestamp will show many hours ahead, and often in the next day, relative to where we are.

I have tried to manually configure the timezone in the Heroku server settings:

timezones

After this change I restarted the application.

However, when I enter the console via

heroku run rails console

I see:

Loading production environment (Rails 5.2.6)
irb(main):001:0> d = Date.today
=> Mon, 07 Feb 2022
irb(main):002:0> 

It's currently February 6th in my timezone.

How can I set this so the database writes are better before I try to configure the code to handle timezones? My app only has 20 users so I'd rather hard code something for now.

Thanks

Jack Collins
  • 229
  • 1
  • 11
  • This could help you : https://stackoverflow.com/questions/6118779/how-to-change-default-timezone-for-active-record-in-rails – Akash Kinwad Feb 07 '22 at 07:57

0 Answers0