Supposing your timestamp is a Ruby Time object:
puts time_stamp.strftime('%s')
puts time_stamp.to_i
timestamp = Time.at(628232400)
In case it is a DateTime object, you have the strftime and strptime methods at your disposal.
Supposing your timestamp is a Ruby Time object:
puts time_stamp.strftime('%s')
puts time_stamp.to_i
timestamp = Time.at(628232400)
In case it is a DateTime object, you have the strftime and strptime methods at your disposal.