# Error in CleanUpUnmatchedIPs: timestamp is 2.7M years BC

**URL:** https://meta.discourse.org/t/error-in-cleanupunmatchedips-timestamp-is-2-7m-years-bc/395229
**Category:** Support
**Created:** [February 4, 2026, 11:50pm UTC](https://meta.discourse.org/t/error-in-cleanupunmatchedips-timestamp-is-2-7m-years-bc/395229 "2026-02-04T23:50:03Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [February 5, 2026, 11:06am UTC](https://meta.discourse.org/t/error-in-cleanupunmatchedips-timestamp-is-2-7m-years-bc/395229/2 "2026-02-05T11:06:57Z")

</div>

Looks like this is caused by a corrupted `last_match_at` value in your `screened_ip_addresses` table.

You can fix it by running the following in the Rails console (`./launcher enter app` then `rails c`):

```ruby
# First, find the problematic record(s)
ScreenedIpAddress.where("last_match_at < '0001-01-01'").each do |sip|
  puts "ID: #{sip.id}, IP: #{sip.ip_address}, last_match_at: #{sip.last_match_at}"
end

# Then either delete it
ScreenedIpAddress.where("last_match_at < '0001-01-01'").destroy_all

# Or fix the timestamp to `NULL` (so it uses `created_at` for the cleanup logic instead)
ScreenedIpAddress.where("last_match_at < '0001-01-01'").update_all(last_match_at: nil)

```

---

_[View the full topic](https://meta.discourse.org/t/error-in-cleanupunmatchedips-timestamp-is-2-7m-years-bc/395229)._
