user3794159
user3794159

Reputation: 23

Changing time format in ruby

This is what I want to do:

Time.at(1403592945) returns 2014-06-24 12:25:45 +0530

How do I convert this to: 2014-06-24 06:55:45

How do I do that in ruby?

Upvotes: 0

Views: 65

Answers (1)

konole
konole

Reputation: 766

You are looking for UTC time.

Time.at(1403592945).utc

Upvotes: 6

Related Questions