Answer the question
In order to leave comments, you need to log in
In Rails, when adding an entry, created_at creates a time not in the current time zone, how to solve?
Added an entry, creates created_at = Mon, 07 Sep 2015 17:01:24 +0000
And the current time is through Time.now: 2015-09-07 20:01:24 +0300
Why are they different, or rather created_at is not correct ???
How to solve???
Answer the question
In order to leave comments, you need to log in
We go to config/environments/development.rb
We putconfig.time_zone = "Moscow"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question