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

  • SEARCH
  • Home
  • 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 7893051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:01:27+00:00 2026-06-03T07:01:27+00:00

I am building a Rails application where users can post the interview details they

  • 0

I am building a Rails application where users can post the interview details they know.The form has a input field interview time which is date time selector.I want to give universal support to this application.

Actual problem:

Let us say I have configured the IST time zone in my production server.Then if a user from Japan selects an interview time which will be parsed in IST time zone.The result will be an incorrect interview time.

To display the correct interview time.

1.Do I need to get the time zone from the user?(probably a select box)

2.Is there is any other option to automatically detect the time zone?

Thank you folks 🙂

If something is unclear please add a comment below the question.

  • 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-03T07:01:29+00:00Added an answer on June 3, 2026 at 7:01 am

    I’ve got a similar issue. I kept the default rails config so all times are stored in UTC in the DB, and I used the following methods from ActiveSupport::TimeZone :

    • when I need to save a date from a form, I used local_to_utc to convert the date from local to UTC:

      ActiveSupport::TimeZone[my_timezone].local_to_utc(date)
      
    • when I need to display a date from the DB, I used

      ActiveSupport::TimeZone[my_timezone].utc_to_local(date)
      

    This way all dates saved in the DB are in UTC, but are handled by the users in local time, that can be different for each user. You can store the timezone at User level (a string field in the DB), and/or use a select helper to generate a select field.

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

Sidebar

Related Questions

I'm building a Rails 3 app where users can select one of a number
Building a rails B2B application that will have various users. I'm pretty clear on
I am building a blog-style application in Rails 3 where multiple users are able
I am building a simple Rails website, where users can create posts and people
I building an application using rails, and I wanna know if is possible to
I'm building a Rails application that requires some models to interact with some necessary
I'm building a Rails application using MongoDB as the back-end and MongoMapper as the
I'm looking at building a Rails application which will have some pretty large tables
I am building a Ruby on Rails application and I want to be able
I'm building an iPhone application that talks to a Ruby on Rails backend. The

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.