Right now I have:
Time.strftime("%I:%M%p") which gives me the hr:min AM/PM format which I need. However it’s coming back in UTC and I need it local time zone.
How do I change it to local time zone and keep that same format for time?
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.
Also, remember that as of Rails 2.1, Timezones are supported.
in your config/environment.rb file:
You can find other values by running
And Ryan Bates has a great railscast on it:
http://railscasts.com/episodes/106-time-zones-in-rails-2-1