Unix Timestamp in Ruby
Look up the current epoch time and convert between Unix seconds and UTC dates in Ruby.
Get the current timestamp
puts Time.now.to_iTimestamp to date
require "time"
puts Time.at(1_700_000_000).utc.iso8601Date to timestamp
require "time"
puts Time.iso8601("2023-11-14T22:13:20Z").to_iOpen 1700000000 in the converter
Current Unix time
Seconds—
Milliseconds—
- UTC
- —
- My time zone
- —
Free to use. Your input stays in this browser.
How to use it
- Copy the current-time example into your Ruby environment to read Unix seconds.
- Run the second example to display 1700000000 as a UTC date.
- Run the last example to convert that date back into seconds.
Time.at takes seconds. Call utc before iso8601 so the text uses Z, and require the time library to use ISO 8601 parsing and formatting.