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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:19:59+00:00 2026-06-14T13:19:59+00:00

My server is in US, rails default timezone is set to ‘UTC’, a user

  • 0

My server is in US, rails default timezone is set to ‘UTC’, a user from India submits the form,Will rails convert that user’s time zone from India to UTC and save it in created_at column or it will save the UTC current time?

  • 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-14T13:20:00+00:00Added an answer on June 14, 2026 at 1:20 pm

    It will save the current time in UTC. Created_at and updated_at are Active Records internal timestamp columns, and as such they are never user input.

    Also, basic security protocol dictates that you should never use the client’s time settings, always the servers.

    Rails will do one thing though – it will use the webserver’s current time in UTC and store it in the database instead of the database servers current time.

    By default, times are stored in UTC + offset format. When you specify the default timezone as lets say “Mumbai” it will return the datetime objects converted for that timezone.

    You can also do:

    Time.zone.parse(@post.created_at.zone)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the default rails server command to launch a web server from the
When I run the project form rails server, it works fine, when I open
Nine times out of ten, whenever I start either the default rails webrick server,
Experimenting with MongoID on a Rails server and confused about how/where to set the
I have just installed Rails Ready script from GitHub on my Ubuntu Server 10.04.
In my current ruby on rails project, I am using webrick (default) server for
I have implemented web service using rails server. The server uses rails default authentication
I have been playing around and evaluating other options to rails' default WEBrick server
My rails server seems to break after installing the facebooker plugin. Any suggestions on
I have a rails server running on URL http://example.com:1234 I want to provide 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.