Timestamps, epochs, and timezones
Unix time, seconds versus milliseconds, UTC offsets, and the daylight-saving edge cases that break scheduled work.
A Unix timestamp counts elapsed time from the epoch, 1 January 1970 UTC. Because it carries no timezone, it is the only unambiguous way to store an instant—everything human-readable is a rendering of that instant in some zone.
Seconds or milliseconds
The same instant is a ten-digit number in seconds and a thirteen-digit number in milliseconds. Passing one where the other is expected lands you in 1970 or in the year 55000, which is why timestamp tools detect the magnitude and label what they assumed.
Store UTC, display local
Store instants in UTC and convert only at the display layer. Storing local times means every read needs to know which zone was in effect, and historical zone rules change more often than people expect.
Daylight saving breaks assumptions
A local day is not always 24 hours long. During a forward transition an hour does not exist, and during a backward transition one hour happens twice. Scheduled work in that window can be skipped or run twice, so jobs need to be idempotent rather than merely well-scheduled.
Offsets are not timezones
"+02:00" is an offset at one moment; "Europe/Berlin" is a zone with rules that produce different offsets across the year. Store the zone identifier when future local times matter, such as recurring calendar events.
Convert and inspect
Translate values with Timestamp Converter, read schedule expressions with Cron Explainer, and see how clock-based scheduling compares with intervals in Cron vs Interval Scheduling.
Try related tools
Keep exploring
- learnTimestamp Converter explainedConvert Unix timestamps and dates with timezone display. A practical guide to Timestamp Converter: when it fits, how to get a reliable result, and the mistakes worth avoiding.
- learnReading and writing cron schedulesThe five cron fields, common expression patterns, and the timezone and overlap issues that make scheduled jobs misfire.
- compareCron vs Interval SchedulingWall-clock cron expressions versus fixed intervals—compare drift, timezone handling, and predictability for scheduled jobs.