Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

Gem::Cooldown.parse_created_at

parse_created_at(value)

Parses a created_at timestamp from the compact index. A timestamp without a time zone offset is read as UTC, because reading it as local time would shift the cooldown window by the environment’s offset. Returns nil for anything unparsable, including a year outside four digits, so the cooldown fails open.