Time and date
Convert timestamps while debugging
Check whether a value is seconds, milliseconds, UTC, local time, or an ISO string before changing code.
Goal: Understand date and time fields in logs, APIs, tokens, and job schedules.
Workflow steps
Step 1
Identify the format
Check whether the value is numeric seconds, numeric milliseconds, an ISO string, or a cron expression.
Step 2
Convert to UTC and local
Compare UTC with local output so timezone assumptions become visible.
Step 3
Check units
Ten-digit Unix values usually mean seconds. Thirteen-digit values usually mean milliseconds.
Step 4
Verify business meaning
A timestamp might mean created, updated, expires, not-before, scheduled-at, or delivered-at. The field name matters.
Real examples
Unix seconds
1778529600ISO date
2026-05-11T12:00:00ZCommon pitfalls
Treating milliseconds as seconds.
Dropping timezone offsets.
Debugging token expiry without checking clock skew.