Unix seconds and milliseconds differ by a factor of a thousand, and code that confuses them puts a date in 1970 or in the year 56000. Generating both, alongside the ISO form, makes the mistake obvious the moment it happens.
What you can control
- Seven formats, including the HTTP date form that
Last-ModifiedandExpiresheaders require. - The DST-edge range concentrates timestamps around a transition, where hours repeat or vanish.
- Eighteen timezones with correct offsets, including the half-hour ones that break naive arithmetic.
- Ordered mode returns an ascending sequence for building a time series.
Testing ideas
- DST transitions. Use the DST range to test scheduling and duration calculations across clock changes.
- Formats. Generate Unix seconds and milliseconds together to catch the 1000× mix-up.
- Time zones. Compare UTC with Asia/Kolkata (+05:30) to test zones with non-hour offsets.
- Relative times. "3 hours ago" output tests relative-time formatting.
What this is not
Timezone conversion uses the runtime's Intl implementation, which depends on its ICU data. A stale ICU build can carry outdated DST rules for regions that changed them recently.