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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:40:34+00:00 2026-05-25T02:40:34+00:00

Each user of our application can have different format for Date and Time. I

  • 0

Each user of our application can have different format for Date and Time. I understand the date format is dependent on user’s language and possibly time zone.

I guess I can try to run something like Date::DATE_FORMATS[:default] = "%m/%d/%Y" in ApplicationController. In this case Date.today.to_s would return the property formatted date. Will it be thread safe?

Another option I am looking at is to store profiles into config/locales/en.yml with different keys like en_US, en_GB, en_... and store locale name into the user’s profile. In this case I will need to use I18n.localize to format the date. Is it possible to fall back to en if there is no key found in specific en_US?

  • 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-25T02:40:35+00:00Added an answer on May 25, 2026 at 2:40 am

    In the case of Date::DATE_FORMATS or TIME::DATE_FORMATS, you will need to take extra care to make their usage threadsafe, unfortunately. Shouldn’t be too difficult to do, however.

    AS for your second question, I believe you are concerned with locale fallbacks, and the i18n gem has support for locale fallbacks. This feature is easily enabled with:

    I18n::Backend::Simple.include(I18n::Backend::Fallbacks)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My Rails application makes use of Time.zone so that each user can set their
in our application we have a lot of different profiles. Each profile enables the
In our application user can create different lists (like sharepoint) for example a user
I have a rails application where each user has a separate database. (taking Joel
Is it better to have a different CSS file for each user-agent or is
I am working on a web application where different user groups have different access
There are several packages in my application that user can select each one according
I have a table with user items. Each user may have several types of
I have a .NET server application that must store passwords that can't be hashed
We just ported our WinForms application to WPF. However, performance decreased dramatically. We have

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.