ruby integer to timestamp

# Step 1: Require the 'date' module
require 'date'

# Step 2: Convert integer to Time object using Time.at
integer_timestamp = 1638622456
time_object = Time.at(integer_timestamp)

# Step 3: Format the Time object as a string in desired timestamp format
timestamp_string = time_object.strftime('%Y-%m-%d %H:%M:%S')

# Result: timestamp_string contains the formatted timestamp
puts timestamp_string