# PostgreSQL timezone correctness gate

> Project brief for Claude Code from NixInc Ideas: https://nixinc.co/ideas/2026-09-28-postgresql-timezone-correctness-gate
> Scored 5.3/10 on 28 Sept 2026, verdict PASS. Prices are as of the dates shown.

## What we're building
In a Postgres-backed SaaS, time comparisons can change with server or session settings and daylight-saving math, which quietly breaks billing, scheduling and reporting across time zones.

## Who pays
Head of Engineering or platform lead at a Postgres-backed SaaS whose billing, scheduling or reporting crosses time zones.

## What they already pay
- pganalyze, One server: $149/mo (as of 28 Sept 2026)
- pganalyze, Four servers: $399/mo (as of 28 Sept 2026)

## Milestone 0: the 72-hour test, before any code
Offer 20 Postgres SaaS teams a repository-and-schema timezone audit using existing tooling.

- Pass line: Success requires 5 responses, 2 audit calls, and 1 paid remediation engagement.
- Stop rule: Kill rule: no paid engagement, or buyers accept the free TZ Doctor report without wanting human verification/remediation.

Do not start milestone 1 until the pass line is met.

## Milestone 1: the smallest version worth shipping
A repository-and-schema timezone audit run with existing tooling such as TZ Doctor, followed by a short report that pairs each finding with a before-and-after test, offered to 20 teams as a paid remediation engagement.

## Skip in v1
Another generic scanner, SQL linting and a CI product; TZ Doctor, SQLFluff and migration linters already cover these.

## Needs
Read access to the buyer's repository and schema, TZ Doctor, a test database to verify fixes, and introductions through Postgres consultancies.

## How to work in this repo
1. Plan before you edit: say which files change, the smallest change that works and how you will check it, then wait for a yes.
2. One task at a time, small enough to read in one diff.
3. After each change, run the checks, then say what changed, what you tested and what still needs a person to look at.
4. Check it like a first-time customer: run the real thing and try the empty, error and success paths.
5. Keep secrets out of the repo and out of chat. Environment files stay local.
6. Ask before installing dependencies, touching payments or sign-in, or deleting files.
7. Do not build anything listed under "Skip in v1".
