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 9251493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:42:53+00:00 2026-06-18T10:42:53+00:00

In config/application.rb , I have set the time zone to EST: config.time_zone = ‘Eastern

  • 0

In config/application.rb, I have set the time zone to EST:

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

The production server has the CST time zone. Consequently, all my date times are displaying the time in CST instead of EST. The time is stored properly as UTC in the database.

EST: -0500
CST: -0600

Database in UTC: 18:15:00
Displayed in CST: 12:15:00
Want in EST: 13:15:00

The schema for the column date_time is:

t.datetime "date_time"

In the view, I call date_time like:

<%= Show.find(1).date_time.strftime('%H:%M') %>

How can I enforce all the time to display in EST across the web site?

  • 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-06-18T10:42:55+00:00Added an answer on June 18, 2026 at 10:42 am

    Turns out it is a bug in the way I was constructing the Time object. The following construct will pick up the default zone Central Time of the server:

    Time.new(2012, 1, 1, 11, 0)
    

    I have to specify the time zone described in config.time_zone which picks up EST properly:

    Time.new(2012, 1, 1, 11, 0, Time.zone.formatted_offset)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have set the time zone in /config/application.rb , and I expect all times
I have a rails app where the time zone is being set in application.rb:
Hi i have created the asp.net web application without considering the time zone. I
I have set session time out to 9 hours in web.config file something like
In my application I have: config.time_zone = 'Warsaw' A strange issue I have, is
In my CakePHP 2 application I have time errors. date_default_timezone_set value inside my Config/core.php
I have a problem, my rake file looks like this: require File.expand_path('../config/application', __FILE__) require
I do NOT have config.active_record.whitelist_attributes = true in application config. And I have attr_protected()
I have a file located at [application]/config/routing.yml, when I change something in there, the
I have added options in application.rb: config.autoload_paths += %W(#{config.root}/lib) config.autoload_paths += Dir[#{config.root}/lib/**/] and lib\functions.rb:

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.