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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:34:12+00:00 2026-05-29T16:34:12+00:00

When I explicitly state in my Production.rb that I want UTC with: # Timezone

  • 0

When I explicitly state in my Production.rb that I want UTC with:

# Timezone Set
config.time_zone = 'UTC'

Then I log into my production machine and run the production console (machine defaults to +4 Mowscow Time).. I get the following output:

$ Time.now
=> 2012-02-04 20:52:32 +0400 
$ Time.zone.now
 => Sat, 04 Feb 2012 16:52:43 UTC +00:00 

The value of Time_ago_in_words is always +4 .. if I post something ‘now’.. it shows as ‘4 hours’…. that counts down to 0 after 4 hours.. then starts being negative (i.e. 1 hour ago)…. How do I get this to display correctly?

=================

After a too many hours trying to figure out how to do this.. I finally figured out just after posting this 😐 I had to run:

sudo dpkg-reconfigure tzdata

And set my timezone to UTC there.. now Time.now outputs the UTC instead of Moscow.. I’ll leave this here for anyone else that runs into this.

  • 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-29T16:34:15+00:00Added an answer on May 29, 2026 at 4:34 pm

    As suggested by those commenting, here is the solution that allowed me to get this to work:

    sudo dpkg-reconfigure tzdata
    

    And set my timezone to UTC there.. now Time.now outputs the UTC instead of Moscow.

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

Sidebar

Related Questions

In Java, the containsAll and retainAll in the AbstractCollection class explicitly state that cardinality
A workaround that I found was to explicitly state in controller render :action =>
The standard explicitly states that main has two valid (i.e., guaranteed to work) signatures;
It's been explicitly written in Django-facebook that they recommend it to be used with
How to explicitly set django_language in Django session? Thanks a lot...
How do you explicitly state the valid settings for an option? Take this example
I get the impression, though it's not explicitly stated anywhere, that using pserve on
the license agreement for the Mac Developer Program explicitly states that I am not
Suppose I want to create a functor that acts upon some general type. For
Per Apple’s Polling Versus Run-Loop Scheduling: [ hasSpace/BytesAvailable ] can mean that there is

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.