Use Time.at:
t = Time.at(i)
time.to_i => int
: Returns the value of time as an integer number of seconds since epoch.
Time.at(seconds[, microseconds]) => time:
Creates a new time object with the given number of seconds (and optional microseconds) from epoch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With