If I know the Time.zone e.g. London, any ideas on how I can display
(GMT+00:00) London
without assigning
Time.zone = "London"
and then calling
puts Time.zone
Thanks in advance!
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.
You can call:
Which will:
per: http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html#method-i-formatted_offset
So if you wanted to format the string, you could do: