- Home
- Skills
- Testing & Debugging
- Timezone and DST Bug Finder for JS, Python and SQL
Works with the AI Agents you already use
Timezone and DST Bug Finder for JS, Python and SQL
Find date and timezone bugs: naive datetimes, local-time parsing, DST gaps, wrong timestamp columns, 2:30 AM cron jobs. file:line evidence + boundary tests. SAFE / DST RISK / BROKEN.
$5
Timezone and DST Bug Finder for JS, Python and SQL
Example session with this skill installed
Customers in the US west coast say invoices show the wrong due date and our 2:30 AM reminder job sometimes doesn't run. Stack is Next.js + Python workers + Postgres. Audit our date handling and fix what's broken. Don't run DB migrations.
- Read your context and instructions
- Compiled the timezone and dst
Date/time audit: billing-app (2026-10-19)
Verdict: BROKEN - 3 bugs with user-visible wrong data, 2 DST risks, 2 false alarms.
Stack: Next.js 15 + date-fns 4, Python 3.12 workers (zoneinfo), Postgres 16, Celery beat (timezone unset -> server TZ America/New_York). CI runs in UTC.
Findings
| # | file:line | Pattern | Concrete wrong output | Class |
|---|---|---|---|---|
| 1 | web/lib/invoice.ts:42 | new Date("2026-11-03") then local display | Due date 2026-11-03 renders as Nov 2 for users at UTC-8 | BUG |
| 2 | workers/reminders.py:18 | datetime.utcnow() compared to aware due_at | TypeError on aware rows; naive rows treated as local | BUG |
| 3 | db/migrations/004.sql:9 | due_at timestamp (no zone) storing instants | Same instant stored differently by web (UTC) and worker (NY) | BUG |
| 4 | celerybeat.py:7 | crontab(hour=2, minute=30) in America/New_York | Skipped on spring-forward day, may run twice on fall-back | RISK |
| 5 | web/lib/dates.ts:11 | + 86400000 for "tomorrow" | Off by 1 h across DST; fine for current date-only use | RISK |
| 6 | reports/daily.sql:3 | date_trunc('day', paid_at) | Correct: report is defined in UTC | OK |
| 7 | web/lib/format.ts:5 | toLocaleString() | Client-only code, browser TZ intended | OK |
Fixes (on branch fix/dates)
- #1: treat due dates as calendar dates:
parseISO+ format without TZ conversion; testinvoice due date does not shift at UTC-8 - #2:
datetime.now(timezone.utc); test with aware fixtures - #4: beat timezone set to UTC, job moved to 07:30 UTC; documented in README
- #5: replaced with
addDays()
Migration proposed (not run)
ALTER TABLE invoices ALTER COLUMN due_at TYPE timestamptz USING due_at AT TIME ZONE 'UTC';
Assumption: existing values were written by the web app in UTC. Rows written by workers since 2026-08-01 were written in America/New_York; list query attached so you can correct them first.
Tests added
5 new boundary tests (DST transitions computed with zoneinfo for 2026 and 2027). CI now runs the suite with TZ=UTC, America/Los_Angeles and Asia/Kolkata. All passing locally (measured).
Convention for this repo
Store instants as timestamptz in UTC, store each customer's IANA timezone, keep due dates as DATE, convert only at input and display.
Connects securely to your tools. The creator never sees your data.
About this skill
Times that shift by an hour twice a year. Due dates that show up a day early for customers in California. A nightly job that silently skipped one night in March and ran twice in November. Reports that disagree depending on who runs them. Date and timezone bugs hide in every codebase because CI usually runs in UTC, so tests pass while real users get the wrong answer.
This skill gives your coding agent a systematic audit of how your code creates, stores, sends, computes and displays dates and times, plus a reference file of grep patterns and boundary test values. It:
- Inventories your stack: JS/TS Date, Intl, Temporal, date-fns, Luxon, Day.js, Moment; Python datetime, zoneinfo, pytz, pandas, Django USE_TZ; Postgres timestamp vs timestamptz, MySQL DATETIME vs TIMESTAMP; cron and scheduler timezones; server and CI TZ
- Scans for the high-yield mistakes: date-only strings parsed as UTC midnight, offset-less timestamps parsed as local time, toISOString().slice(0,10) as "today", 86400000 ms as "one day", datetime.utcnow() and other naive datetimes, pytz zones passed to the constructor, BETWEEN date ranges that drop the last day, per-user reports grouped by UTC day, jobs scheduled inside the DST window
- Proves each finding with a minimal failing test using real boundary values (spring-forward gap, fall-back repeat, half-hour offsets, users near midnight, leap day, month-end)
- Classifies every hit BUG, RISK or OK, with file:line and the concrete wrong output
- Fixes with the libraries you already use, smallest diff first, and proposes (never runs) column migrations with the conversion assumption spelled out
- Makes CI run tests under non-UTC timezones so these bugs cannot hide again
- Gives a verdict: SAFE, DST RISK or BROKEN, plus a short date/time convention for your repo
For developers and teams shipping scheduling, booking, billing, reporting, reminders or anything used across regions.
Honesty note: it computes DST dates and offsets with your timezone library or the IANA database instead of stating them from memory, never claims a test passes unless it ran, and never converts stored data without your approval.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.
Covers code and config in the repo; third-party services and dashboard-only settings are listed as not checked. Large codebases are audited highest-risk first. Proposed database migrations are never run without approval.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 28 days ago
- Software
Git
JestorVitestorpytestNode.js
orPython
Use the test runner and language your project already uses.