Answer the question
In order to leave comments, you need to log in
How to change the time zone in Ruby on Rails?
I wrote in locales/aplication.rb: config.time_zone = "Moscow" .
But in models, when I write Time.now, it does not save the current date (hours), but the early one by 3 hours.
How to solve the problem?
And yet, instead of writing Moscow, can't you do something else so that the system determines the current time zone?
Answer the question
In order to leave comments, you need to log in
But in models, when I write Time.now, it does not save the current date (hours), but the early one by 3 hours.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question