Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 678147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:07:04+00:00 2026-05-14T01:07:04+00:00

My site is deployed on heroku. Time.now will return today, but the created_at field

  • 0

My site is deployed on heroku. Time.now will return today, but the created_at field of a record (created right now) will say its tomorrow. I assume this has to do with server time?

Is there a way to make sure they’re the same?
Best,
Elliot


Update so I did this “heroku rake time:zones:us”

it gave me:

    * UTC -10:00 *
Hawaii

* UTC -09:00 *
Alaska

* UTC -08:00 *
Pacific Time (US & Canada)

* UTC -07:00 *
Arizona
Mountain Time (US & Canada)

* UTC -06:00 *
Central Time (US & Canada)

* UTC -05:00 *
Eastern Time (US & Canada)
Indiana (East)

however, when I set config.time_zone = ‘UTC -05:00’ in my environment, the app fails to start. any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:07:04+00:00Added an answer on May 14, 2026 at 1:07 am

    Rails always stores UTC time on the database; the created_at field by itself should be offset by exactly your timezone’s variation relative to UTC.

    Whenever you load a record in your application, the fields get converted to the timezone specified in environment.rb. It might have something like this:

    config.time_zone = 'UTC'
    

    For the time to be converted properly to your timezone, you might change this configuration setting to one matching your actual time zone. For instance:

    config.time_zone = 'Central Time (US & Canada)'
    

    To see available zones, issue “rake -D time” on your rails directory. This will give you instructions on how to get time zone names for use in configuration.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've a Web site with hundreds of html pages that are already deployed. Now
I have a site that I deployed to Heroku. It's a low traffic site
I recently deployed a site http://boardlite.com . One of the tester websites http://www.gidnetwork.com/tools/gzip-test.php suggests
I have a Windows Azure site which is deployed to two separate hosted services.
I'm doing maintenance work on a Rails site that's deployed using Phusion Passenger .
Our software is deployed at a client site where they are having performance issues,
I've deployed a .NET website to a 2008 (IIS7) server and the site seems
I developed a Drupal site on XAMPP. I deployed it to an Apache webserver
I have the following code, deployed on a https Asp site, build with MVC
Site here . Why is it that the code works for $('#club').change(function(event) but not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.