This seems like a simple problem but I can't seem to find the answer. I have a UTC time (ie. 1323481111) and I want to change it to a DateTime or TimeWithZone object in a ruby script. I haven't found a way to do it with just ruby but I believe there should be a way to do it using ActiveSupport. It seems to me that I should be able to do it as follows:
require "active_support/all"
Time.zone.at(1323481111)
http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html
But that doesn't seem to work. Anyone know how to convert a utc int to a datetime object?