About this tool
Generate the shifted date and time values a forward-date test needs, without touching a system clock.
- Shifts a base date and time by minutes, hours, days, weeks, months, or years in any IANA zone this browser recognizes, then optionally snaps the result to the start of next month, end of month, end of quarter, end of year, the next leap day, the next DST transition, or the same time tomorrow.
- Outputs the simulated instant as ISO 8601 with offset, ISO 8601 UTC, Unix epoch seconds and milliseconds, RFC 2822, HTTP-date, a local formatted string, SQL DATETIME, and the day of week, each with its own copy button.
- Builds an edge-case fixture table covering month-end lengths of 28, 29, 30, and 31 days, leap day, quarter ends, the year rollover, daylight-saving spring-forward and fall-back instants, plus 14, 30, 90, and 365-day expiry boundaries, and exports it as JSON or CSV alongside Jest, freezegun, and java.time mock setup snippets.
How to use Date Simulator
Set the base date and time, choose the IANA zone, enter a signed shift amount and unit, optionally pick a snap preset, then run the simulation and review the notes before copying a value, exporting the fixture set, or downloading the JSON evidence report.
When this tool is useful
- Preparing forward-date test values for month-end, quarter-end, year rollover, leap day, or expiry scenarios.
- Finding the exact daylight-saving spring-forward and fall-back instants for a specific zone before writing a regression test.
Practical tips
- Month and year shifts clamp to the last real day of the target month, so read the clamp note rather than assuming Jan 31 plus one month is Mar 2.
- Day and week shifts keep the local wall-clock time while minute and hour shifts add exact elapsed time; pick the one that matches what your code actually measures.
- Run a Jest or freezegun suite with the same TZ as the zone selected here, because freezing the clock does not change the process time zone.
Examples you can test
Load an example, compare the result with the expected output, then replace it with your own input.
Shift a billing date past month end
Example input
2026-01-31 09:00 in UTC, plus 1 month
Expected output
2026-02-28T09:00:00+00:00 with an explicit month-end clamp note, plus a fixture table and mock snippets
The value is generated for your test harness; no system clock is changed.
Validation checklist
- Confirm the selected IANA zone matches the zone the application under test uses.
- Read every note, especially month-end clamping and skipped or repeated wall-clock times around DST transitions.
- Verify the simulated behavior inside your own application, because generated values prove arithmetic rather than application correctness.