Hello,
How to convert utc time to a time in a particular time zone. As I
need to display local time of timezone(-05:00).
Thank you,
Praveen
Hello,
How to convert utc time to a time in a particular time zone. As I
need to display local time of timezone(-05:00).
Thank you,
Praveen
On Friday, April 4, 2014 2:37:28 AM UTC-4, Ruby-Forum.com User wrote:
ā
Posted via http://www.ruby-forum.com/.
use the ruby method local time. in my example, i have an object post
with
an attribute created_at that is a date/time. You display this in local
time with formatting as follows:
<%= post.created_at.localtime.strftime(ā%-m/%-d/%Y at %-I:%M %pā) %>
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs