Category · 1 tool · 1 guide
Timestamp, date and time tools
Time is one of the most common sources of bugs in software. Logs record Unix timestamps, databases store values in UTC or, worse, in server local time, APIs return ISO 8601 strings, and users expect to see their own time zone. Every conversion between those forms is a chance to be off by an hour, a day or a factor of a thousand.
Developers constantly need to answer simple questions quickly: what time is 1760000000? Is this value in seconds or milliseconds? When does this token expire in my local time? Was that log entry before or after the deploy? Doing the arithmetic in your head is error-prone, especially around daylight saving changes.
The tools here convert between epoch numbers and human-readable dates in both directions, work in UTC or your local zone, and detect seconds versus milliseconds automatically. Everything runs in your browser using your system clock and time zone settings.
Tools in this category
Common tasks
- Read a timestamp from a log linePaste the number from a log or database row and see the exact date in UTC and in your own time zone.
- Check when a token expiresThe exp and iat claims in a JWT are Unix seconds; decode the token to see them as dates.
- Store and display times correctlyLearn why you should store UTC, convert at the edges and keep the user's IANA zone name.
- Set a cron schedule for a deploymentRemember that Kubernetes CronJobs run in the controller time zone unless you set timeZone explicitly.
- Choose time-ordered IDsUUID v7 starts with a millisecond timestamp, so IDs sort by creation time; compare it with random v4.
Key concepts
- Unix timestamp
- The number of seconds since 1 January 1970 00:00:00 UTC, ignoring leap seconds. It is the same everywhere in the world at a given moment, which makes it ideal for storage and comparison.
- Seconds vs milliseconds
- Unix tools and most APIs use seconds (10 digits today); JavaScript Date and Java use milliseconds (13 digits). Mixing them gives dates in 1970 or far in the future.
- ISO 8601
- The standard text format for dates, such as 2026-10-09T14:30:00Z or 2026-10-09T16:30:00+02:00. It sorts correctly as a string and states its offset explicitly.
- Offset vs time zone
- An offset like +02:00 is fixed. A time zone like Europe/Berlin is a set of rules that changes the offset for daylight saving. Store the zone name when you need future local times.
- Year 2038 problem
- Signed 32-bit integers overflow on 19 January 2038 at 03:14:07 UTC. Systems that still store timestamps in 32-bit fields will wrap to 1901.
Best practices
- Store instants in UTC, as a timestamp or timestamptz column, and convert to local time only when displaying.
- Name units explicitly in field names, for example created_at_ms or ttl_seconds, so nobody guesses.
- Use ISO 8601 with an offset or Z in APIs instead of locale formats like 10/09/2026, which are ambiguous.
- Use a 64-bit integer type for timestamps to avoid the 2038 overflow.
- Test date logic around daylight saving transitions and month ends, where most time bugs hide.