I am using Time.zone.now to get the user’s time.
I think that this is wrong. Can you confirm that it is wrong? How can I get the user’s time?
Who is setting Time.zone on my server?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Yes this is wrong. Time.zone is whatever your application’s timezone is set to. This is usually set in application.rb
If you want a user’s timezone, you’ll need to either get it from the client side via JavaScript or let the user set it themselves in your application.