{
  "id": 21017346,
  "title": "A trash cleanup that deleted records a day early, and how I tested it in 2 minutes",
  "url": "https://urgent.news/2026/11/21/a-trash-cleanup-that-deleted-records-a-day-early-and-how-i-tested-it",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-21T08:06:36.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/asmodeus14/a-trash-cleanup-that-deleted-records-a-day-early-and-how-i-tested-it-in-2-minutes-4ljn"
  },
  "original_language": "en",
  "account": "The open-source CRM Twenty retains deleted records in the trash for 14 days before permanently deleting them. However, a bug caused a record deleted just before midnight UTC to be permanently deleted 11 minutes later when the retention period was set to 1 day. The issue stemmed from the +1 added to the retention days, which moved the cutoff date forward one day, making it dependent on the server's time zone. A developer named Asmodeus14 created ChronoStack, a tool that allows users to move the clock forward in a Docker Compose stack, enabling the testing of time-based features without relying on manual timestamp edits or temporary flags. ChronoStack runs a virtual copy of the stack on a separate clock, allowing for quick and repeatable testing of various scenarios. The developer tested ChronoStack by simulating a bug in the Twenty CRM, and it successfully identified the issue within just two minutes. The tool supports various programming languages and has been tested on Linux, Windows, and Intel Macs. ChronoStack is an open-source project under MIT/Apache-2.0 licenses and can be installed using Homebrew, Scoop, or Cargo.",
  "summary": "Twenty, the open-source CRM, keeps deleted records in the trash for 14 days before deleting them for good. At least, that's what it says. A record deleted at 23:50 was actually gone after 13 days and 20 minutes. With retention set to 1 day, a record deleted just before midnight UTC disappeared 11 minutes later. The code looked reasonable: private calculateCutoffDate(trashRetentionDays: number):…",
  "key_points": [
    "CRM Twenty retains deleted records for 14 days before permanent deletion.",
    "Bug caused record deleted at 23:59 UTC to be permanently deleted at 00:10 UTC.",
    "ChronoStack allows testing of time-based features in two minutes."
  ],
  "editors_take": "ChronoStack provides developers with a way to simulate time-based failures rapidly, turning tedious manual timestamp edits into efficient, repeatable tests for complex retention logic and server-dependent bugs.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}