Negative Unix timestamp in Ruby

2 weeks ago 22
ARTICLE AD BOX

I have the following Unix timestamp:

time = Time.at(-8_640_000_000_000) # => -271821-04-19 19:00:00 -0500 time.strftime('%B %-d, %Y at %-I:%M %p') # => "April 19, -271821 at 7:00 PM"

But when displaying the same time on Discord via timestamp formatting:

<t:-8640000000000> # => November 19, 271817 at 7:03 PM

The timestamp shown is wildly different. I am assuming there is precision loss happening somewhere here. Is there any way to know when a negative unix timestamp will be too old to reliably represent?

Read Entire Article