convert epoch times back into Time objects : Convert to Date « Time « Ruby






convert epoch times back into Time objects


epoch_time = Time.gm(2007, 5).to_i
t = Time.at(epoch_time)
puts t.year, t.month, t.day

 

Related examples in the same category