How to convert time from one timezone to another


 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,

On Friday, April 4, 2014 2:37:28 AM UTC-4, User wrote:

Posted via

use the ruby method local time. in my example, i have an object post
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") %>