~/qa-guides

~/qa-guides/date-and-time-testing-checklist

>_ Date and Time Testing Checklist: Examples and Test Cases

Check calendar validation, date-only values, appointment scheduling, and daily reports with three worked examples and 15 test cases.

Date and time testingTime zonesTest casesData validation

Published

Short answer

A date and time testing checklist verifies calendar validation, the meaning of stored values, time-zone conversion, scheduling, and date-range boundaries. A useful test checks both the displayed result and the value that survives saving, reloading, API exchange, or export.

Start by identifying what the field represents. A birth date is a calendar date. A recorded payment has an instant on a timeline. An appointment entered for a location needs local date, local time, and that location's time-zone rules. These values require different expectations even when the interface uses similar controls.

This guide includes a practical checklist, three worked examples, and 15 test cases. The examples define their own product rules for date validation, ambiguous appointments, and daily reports. Adapt those rules before using the cases in another product.

Identify the meaning before choosing test data

Record the value's meaning separately from its display format:

  • Calendar date: A value such as 2026-03-08 identifies a day in the chosen calendar. The birth-date example keeps that date unchanged across viewing time zones.
  • Local date and time: A value such as 2026-11-01T01:30 contains clock and calendar fields. Mapping it to an instant can require a named time zone and an ambiguity decision.
  • Instant: A value such as 2026-11-01T05:30:00.000Z identifies a point on the timeline. Another offset representation can identify the same instant.
  • Named time zone: An identifier such as America/New_York selects rules used to interpret or display local time. A numeric offset describes the relationship to UTC at a particular point; it does not supply the zone's transition rules.
  • Duration or calendar interval: An elapsed 24 hours and the next occurrence of a local calendar time can produce different results around a clock change. Specify which operation the feature promises.

The W3C draft guidance on time and time zones distinguishes floating calendar values from instants and discusses the information needed for conversions. Use those distinctions to define the field contract; the draft does not prescribe your product's validation policy.

For ordinary controls, required fields, and form submission behavior, use the broader form testing checklist. This guide develops the calendar and timeline expectations behind those controls.

Define a date and time test contract

Before execution, answer these questions for each field or filter:

  • Which calendar and supported year range apply?
  • Is the value a date, a local time, a local datetime, an instant, or a duration?
  • Which formats does each interface accept, and which format does it return?
  • Does the user choose a time zone, inherit an account setting, or use a fixed business zone?
  • Which clock decides whether a value is in the past, expired, or eligible?
  • Are minimum and maximum values inclusive or exclusive?
  • What precision is supported, and how are extra fractional digits handled?
  • What happens when a local time does not exist or occurs twice?
  • Which values are persisted, and which are calculated for display?
  • Which side effects must remain absent when validation fails?

Keep product choices explicit. Rejecting an ambiguous appointment, asking the user to choose an occurrence, and using a documented default are different contracts. A test cannot determine the intended one from a successful HTTP response alone.

Record the test environment's relevant time-zone data version when possible. Also record the application build, service clock, browser locale, browser zone, account zone, and business zone. Several settings can coexist in one workflow.

Quick date and time testing checklist

For a focused release pass:

  • Save a valid value and compare it with the returned and reloaded value.
  • Reject an impossible calendar date without silently changing it.
  • Exercise leap-day acceptance and rejection in appropriate years.
  • Distinguish required, empty, null, malformed, and wrong-type input.
  • Test exact limits and the nearest supported values outside them.
  • Repeat a date-only save from clients in different time zones.
  • Compare equivalent timestamp representations when offsets are supported.
  • Exercise one nonexistent and one repeated local time in a supported zone.
  • Verify daily filters across a clock change using exact boundary records.
  • Compare report identifiers and exported values, including after a display-zone change.

These checks are a starting set. Select additional zones, languages, date ranges, and integration paths from the actual feature requirements.

Full date and time testing checklist

1. Validate calendar dates independently of formatting

Test a normal date, the final day of a month, the first day of the next month, and an impossible day. A parser accepting a string does not prove the calendar date exists under the chosen rules.

For Gregorian dates, include 2026-04-30, 2026-04-31, 2024-02-29, and 2023-02-29. Where the supported year range permits it, distinguish 2000-02-29 from 1900-02-29: the first is a leap day and the second is not.

Check the persisted result. A failure includes a supposedly rejected April 31 becoming May 1, or an invalid February date being carried into March. For an edit, retain the previously saved value unless the contract explicitly defines another outcome.

2. Separate accepted input formats from display formats

List the formats supported by each entry point. A localized screen can display 07/06/2026 while sending a canonical date such as 2026-06-07 to an API.

Use an ambiguous value to expose assumptions. Under a day-first rule, 06/07/2026 means July 6; under a month-first rule, it means June 7. Verify that labels, parsing, confirmation, and the stored result agree.

Test unsupported separators, missing leading zeros where they matter, leading and trailing spaces, and unexpected time components according to the documented contract. Do not let a test tool's automatic formatting conceal the original request. Preserve the exact input and captured payload as evidence.

3. Check missing values, nulls, types, and clearing

For a required field, submit it missing, as an empty string, as null, and with an incorrect type through the API. Verify a clear field error and the absence of a successful write.

For an optional field, define whether omission preserves the old value and whether an explicit empty or null value clears it. Test create and update separately if their rules differ.

Watch for accidental defaults. An empty date becoming a date near the Unix epoch, today's date, or a previously selected value can hide a parsing or state-management defect. After an unsuccessful edit, reload the record and check the actual saved state.

4. Exercise the picker and manual entry paths

Select a date using the picker, navigate across month and year boundaries, and repeat with manual entry if the product supports it. Confirm that both paths produce the same canonical value.

Check keyboard access, visible focus, field labels, clear actions, validation feedback, and mobile interaction. Verify that a disabled date cannot be submitted through another supported entry path.

Use a date whose day and month differ to detect swaps. After a validation error in another field, confirm that the selected date remains visible and unchanged. Test editing an existing record as well as creating one; initialization can introduce a conversion that the initial save did not perform.

5. Preserve date-only meaning across time zones

For a date-only field, compare the calendar value before submission, in the request, in the saved record, and after reload from another zone.

A midnight timestamp can introduce a conversion the field never required. If a birth date changes when a viewer changes location, inspect whether the date was first interpreted as an instant and then formatted in that viewer's zone.

Choose clients on both sides of UTC and include a zone with a large positive offset. Keep the expected calendar date constant when that is the field's contract. A delivery date tied to a specific location may require a different interpretation, so document the business meaning before reusing the birth-date expectation.

6. Define which clock and zone decide today

For rules such as no future birth dates, available tomorrow, or booking closes today, identify the evaluation clock and the calendar zone used to derive the date.

Freeze that clock in a controlled test environment. Test immediately before and after midnight in the business zone while the client remains in another zone. A browser date changing earlier should not independently change a server-enforced business rule.

For age thresholds and anniversaries, obtain an explicit policy for leap-day birthdays and the exact evaluation date. Testing February 28 and March 1 without that policy produces observations, but no reliable pass or fail decision.

7. Compare instants at the declared precision

When an interface accepts timestamps with offsets, submit two representations of the same instant. For example, 2026-07-15T13:00:00.000Z and 2026-07-15T09:00:00.000-04:00 should compare equally in a feature whose contract compares instants.

Check whether storage and responses preserve, round, or truncate fractional seconds according to the specification. Select boundary neighbors at that supported precision.

Inspect ordering using normalized instants rather than the original timestamp text. Test values that cross a date boundary after conversion. A changed date in the display is legitimate for an instant when the selected viewing zone requires it; use the underlying instant to decide whether data changed incorrectly.

8. Retain the zone information a scheduled event needs

Create an event in a selected named zone and retrieve it with the server process and browser configured differently. Check the original zone and local scheduling fields as well as the resolved instant.

Test an unsupported zone identifier and a missing zone when the operation requires one. Verify the documented error instead of an unnoticed fallback to the server's zone.

If editing preserves the event's original zone, verify that opening and saving the editor does not replace it with the viewer's current setting. Changing a viewing preference and explicitly rescheduling the event are different user actions and need separate expectations.

9. Check nonexistent and repeated local times

Choose actual transition dates for a supported named zone. Test a local time inside a gap, a local time inside a repeated interval, and an ordinary time near each interval.

For a gap, inspect whether the product rejects, adjusts, or requests another selection as specified. A successful save at a different time is a defect under a rejection contract.

For a repeated time, inspect which occurrence was selected and how the interface communicates it. Verify the resolved UTC instant and offset. A label containing only date and clock time can make two different appointments look identical; the appointment example below requires an explicit occurrence choice.

10. Separate elapsed durations from recurring calendar times

Ask whether an event repeats after an elapsed duration or at a particular local clock time. Test the stated operation across a transition.

For a local daily schedule, check the local date and time of each occurrence and the resulting instants. For an elapsed-duration operation, compare the instant difference and allow the displayed local time to follow from that calculation.

Define policies for occurrences that land in a gap or repeated interval. Also check cancellation and editing of an individual occurrence if the product supports them. The worked appointment model below is a one-time event with a 60-minute elapsed duration; it does not define a recurring-series policy.

11. Derive report bounds from the requested calendar period

For a report defined by a day in a selected zone, resolve the start of that day and the start of the next calendar day in that zone. Compare the resulting instant boundaries with the request actually sent to the backend.

Under an inclusive-start, exclusive-end rule, test a record exactly at the start, just before the end, and exactly at the next start. The last belongs to the following period.

Do not assume every local day covers 24 elapsed hours. The worked report example supplies 23-hour and 25-hour periods, with identifiers that expose omissions and duplicate handling. A report with an inclusive end or another period definition needs different expectations.

12. Follow values through APIs, imports, and exports

Trace a sample through every transformation used by the feature: entry, request, saved representation, response, display, and export. Record the meaning at each step rather than demanding identical text where a documented conversion applies.

Use the API integration testing checklist for mapping and downstream updates. For file-based entry, the CSV import testing checklist covers parsing, row validation, and import outcomes.

Check date-only fields for unwanted zone conversion and instant fields for lost offsets or precision. Re-importing an export is an additional test only when the product promises that round trip; a display-oriented spreadsheet is not automatically an import format.

13. Compare clients and messages using the same event

Open one saved event on desktop, mobile, and another supported client. Set the viewers to different zones and locales deliberately, then compare each display with its declared context.

Check confirmation pages, emails, calendar attachments if supported, and activity history. A message that says only 9:00 may leave the recipient unable to identify the intended appointment.

Change the account zone and the device zone separately. Establish whether an existing event retains its scheduling zone or changes only its presentation. Verify date labels as well as clock labels when an instant falls on different calendar days for different viewers.

14. Test expiry and ordering with controlled clocks

Identify whether a cutoff is evaluated at request validation, transaction commit, job start, or another event. A request crossing the cutoff during processing needs an expected result tied to that event.

Use a fixed service clock and inspect saved state and side effects. Manipulating only the browser clock cannot establish an exact backend cutoff result.

The expiry example in boundary value analysis shows how to select before, at, and after values with millisecond precision. Keep those boundary checks separate from tests of offset representation, local display, and clock ownership so a failure has a clear cause.

15. Recheck scheduled work after retries and changes

If a feature queues a reminder or scheduled action, inspect the intended execution instant and the identity of the event it belongs to. Reschedule the event and verify the promised treatment of the old job.

Retry a delivery or resume processing after a controlled interruption. Check whether the action occurs once or follows another documented retry contract. A correct displayed appointment does not establish that the background job uses the same instant.

When supported zone data changes, compare the product's handling of future appointments with its policy. Establish whether the local schedule or the previously resolved instant takes priority. Preserve historical evidence rather than treating all stored timestamps as values to recalculate.

16. Capture evidence that explains the time calculation

Record the submitted text, parsed meaning, chosen zone, resolved offset, UTC instant where applicable, and displayed value. For a report, record both interval bounds and the returned identifiers.

Capture the evaluation clock and relevant settings with the defect. A screenshot showing 01:30 is insufficient evidence for selecting the wrong occurrence of a repeated time.

Separate an unexplained requirement from a confirmed implementation failure. If the product never states which zone defines a report day, establish that contract before accepting or rejecting a particular set of records.

Worked example 1: A birth date that must stay a date

Assume a profile has a required birth-date field with these rules:

  • The API accepts a real Gregorian date as exactly YYYY-MM-DD, without a time or offset.
  • The inclusive minimum is 1900-01-01. The inclusive maximum is today's date in the business zone, America/New_York.
  • The service clock is fixed at 2026-11-17T12:00:00.000Z, making the maximum 2026-11-17 for this fixture.
  • The UI supports localized date entry: day-first in en-GB and month-first in en-US. It sends the canonical API date.
  • Missing, null, empty, malformed, impossible, or out-of-range values produce a field validation error and do not overwrite the saved date.
  • A successful save returns the canonical date. Viewing from another time zone does not change that calendar value.

Start every independent edit test with saved value 1990-06-15. Keep other profile fields valid. The examples make no age-eligibility rule beyond the stated date range.

Entering 06/07/2026 in the day-first UI must send 2026-07-06. Entering the same text in the month-first UI must send 2026-06-07. Sending 06/07/2026 directly to the API must fail because that interface accepts only the canonical format.

For a successful round trip, save 2026-03-08. Reload from clients configured for UTC, America/Los_Angeles, and Pacific/Kiritimati. Localized formatting may differ, but each client must still show March 8 and the API must still return 2026-03-08.

This separates parsing from meaning. The UI may translate a supported localized entry into a canonical date; the application must not translate the saved birth date into a different calendar day for another viewer.

Worked example 2: An appointment in a named time zone

Assume a one-time appointment feature with these rules:

  • The request contains a local start to minute precision, a supported named zone, and an occurrence choice when required. The examples use America/New_York.
  • A nonexistent local time is rejected with no appointment or confirmation created.
  • A repeated local time requires the user to select the earlier or later occurrence. Submitting it without that choice is rejected.
  • A successful save retains the local start, zone, selected offset, and resolved UTC instant. UTC responses use millisecond precision.
  • The appointment lasts exactly 60 elapsed minutes. Its end instant is the start instant plus 60 minutes.
  • The editor uses the saved scheduling zone. A viewing-zone preference changes presentation without rescheduling the appointment.

Use a service clock fixed at 2026-01-01T00:00:00.000Z for these tests. Other fields, permissions, availability, and capacity checks pass. Run alternative creation inputs independently, clearing the prior appointment between runs.

The transition fixtures follow the US rules applied to New York in the IANA North American time-zone data. In this zone, the 2026 spring transition is March 8 and the autumn transition is November 1. These dates and the one-hour change are specific to this fixture, not a universal pattern for time zones.

An ordinary local start

Local start 2026-07-15T09:00 resolves with offset -04:00 to 2026-07-15T13:00:00.000Z. The 60-minute appointment ends at 2026-07-15T14:00:00.000Z, displayed as 10:00 in its scheduling zone.

After switching the viewing zone to UTC, the start display becomes 13:00 with UTC identified. The editor still opens the saved 09:00 New York schedule. Saving an unchanged edit must preserve the instant and original scheduling zone.

A nonexistent local start

On 2026-03-08, the local clock moves from the 01:59 hour to the 03:00 hour. Local start 2026-03-08T02:30 has no matching instant under these rules.

The example contract rejects that input. Verify that neither a shifted 03:30 appointment nor a confirmation is created. Do not accept an apparently reasonable adjustment as a pass when the declared behavior is rejection.

Two occurrences of the same clock time

Local start 2026-11-01T01:30 occurs twice:

  • Earlier occurrence: Offset -04:00, resolved start 2026-11-01T05:30:00.000Z.
  • Later occurrence: Offset -05:00, resolved start 2026-11-01T06:30:00.000Z.

The starts differ by 60 elapsed minutes. A response containing only the local text cannot establish which one was saved.

For the earlier occurrence, adding the specified 60 elapsed minutes gives end 2026-11-01T06:30:00.000Z. Its local end is 01:30 with offset -05:00. The unchanged clock label does not mean the duration is zero. For the later occurrence, the end is 2026-11-01T07:30:00.000Z, or 02:30 with offset -05:00.

Show enough context to distinguish the occurrences and verify the actual instant difference. Adding one to the displayed hour would implement a different operation from the elapsed duration defined here.

Worked example 3: A daily report across a clock change

Assume an event report with these rules:

  • The user selects a Gregorian calendar day and an explicit report zone. The default zone is America/New_York.
  • The interval includes the start of the selected local day and excludes the start of the next local day: start <= occurred_at < end.
  • Event timestamps are stored as instants at millisecond precision. Results are ordered by instant, then identifier, and each event appears once.
  • Changing the browser or viewing zone does not change the explicit report zone. Deliberately changing the report-zone control recalculates the interval.
  • The CSV export contains exactly the filtered event rows. Its fields include event_id, UTC occurred_at, selected report_date, and report_zone.

Seed the following 12 events. Their identifiers are part of the expected result; a matching row count alone is insufficient.

Spring fixtures and the 23-hour day

For March 8 in New York, local midnight starts at 2026-03-08T05:00:00.000Z. The next local midnight is 2026-03-09T04:00:00.000Z. The interval therefore spans 23 elapsed hours.

  • S0: 2026-03-08T04:59:59.999Z, immediately before the interval.
  • S1: 2026-03-08T05:00:00.000Z, exactly at the included start.
  • S2: 2026-03-08T06:59:59.999Z, immediately before the clock jump.
  • S3: 2026-03-08T07:00:00.000Z, immediately after the clock jump.
  • S4: 2026-03-09T03:59:59.999Z, the final supported millisecond inside the interval.
  • S5: 2026-03-09T04:00:00.000Z, exactly at the excluded end.

Expected ordered identifiers are S1, S2, S3, and S4, with count 4. A fixed 24-hour interval starting at the correct beginning would also include S5, which belongs to March 9 under the report contract.

Autumn fixtures and the 25-hour day

For November 1 in New York, local midnight starts at 2026-11-01T04:00:00.000Z. The next local midnight is 2026-11-02T05:00:00.000Z. This interval spans 25 elapsed hours.

  • F0: 2026-11-01T03:59:59.999Z, immediately before the interval.
  • F1: 2026-11-01T04:00:00.000Z, exactly at the included start.
  • F2: 2026-11-01T05:30:00.000Z, the earlier local 01:30.
  • F3: 2026-11-01T06:30:00.000Z, the later local 01:30.
  • F4: 2026-11-02T04:59:59.999Z, the final supported millisecond inside the interval.
  • F5: 2026-11-02T05:00:00.000Z, exactly at the excluded end.

Expected ordered identifiers are F1, F2, F3, and F4, with count 4. Both 01:30 events must survive filtering and rendering because they are separate events at different instants. Grouping or deduplicating solely by the displayed local timestamp would lose information.

Adjacent periods and an intentional zone change

The March 9 New York report must include S5 and exclude S4. With this dataset, its only row is S5. The November 2 New York report similarly contains only F5. The end of one interval is exactly the start of the next.

Now explicitly select UTC as the report zone for March 8. Its interval becomes 2026-03-08T00:00:00.000Z through the exclusive end 2026-03-09T00:00:00.000Z. Expected identifiers become S0, S1, S2, and S3.

The UTC and New York reports each contain four records, but their membership differs. Check identifiers and bounds to distinguish a legitimate report-zone change from an accidental conversion caused by the viewer's device settings.

15 date and time test cases

Use the three contracts above. Reset saved state between independent inputs and keep unrelated fields valid. Where a case lists alternative inputs, execute each as a fresh run and record its result separately.

Test case 1: Preserve a birth date across viewing zones

  • Preconditions: The profile fixture and fixed November service clock are active. The saved date is 1990-06-15.
  • Input: Canonical date 2026-03-08.
  • Steps: Save the date, inspect the API response, and reload from clients using UTC, Los Angeles, and Kiritimati zones.
  • Expected result: The stored and returned value is 2026-03-08. Every client displays March 8 in its supported format, with no day shift.

Test case 2: Distinguish a leap day from impossible dates

  • Preconditions: Reset the profile fixture before each input.
  • Inputs: 2024-02-29, 2023-02-29, and 2026-04-31.
  • Steps: Submit each canonical-looking date directly to the API and reload the profile.
  • Expected result: The leap day is accepted and saved exactly. Each impossible date produces a field validation error and leaves 1990-06-15 saved; no normalized March or May date is written.

Test case 3: Keep localized parsing out of the canonical API

  • Preconditions: The profile UI supports the declared British and US entry formats. Reset between runs.
  • Input: Text 06/07/2026.
  • Steps: Enter it in the British UI, then in a separate run in the US UI, and inspect each request. In another run, send that text directly as the API date.
  • Expected result: The British request sends and saves 2026-07-06; the US request sends and saves 2026-06-07. The direct API request is rejected and preserves the prior date.

Test case 4: Enforce the inclusive date range

  • Preconditions: The service clock is 2026-11-17T12:00:00.000Z; the business zone is New York. Reset before each input.
  • Inputs: 1899-12-31, 1900-01-01, 2026-11-17, and 2026-11-18.
  • Steps: Submit each value and compare the response with saved state.
  • Expected result: The exact minimum and maximum are accepted. The day before the minimum and the day after the maximum are rejected without overwriting the prior date.

Test case 5: Reject empty and incorrectly typed dates without defaults

  • Preconditions: Reset the profile fixture before each request.
  • Inputs: An omitted field, null, an empty string, and numeric value 0.
  • Steps: Submit each request, inspect field feedback, and reload the record.
  • Expected result: Each request fails validation and leaves 1990-06-15 saved. No value is replaced with today, an epoch-derived date, or a blank success result.

Test case 6: Use the service's business date for a future-date rule

  • Preconditions: Keep the service clock fixed at the profile fixture's November instant. Configure the test browser to show November 18 through its controlled client clock.
  • Input: 2026-11-18 through the direct API path.
  • Steps: Submit the value without changing the service clock or business zone, then reload the profile.
  • Expected result: The API rejects the future birth date and retains the saved value. The browser's date does not advance the service's maximum.

Test case 7: Resolve an ordinary appointment and preserve its schedule

  • Preconditions: The appointment fixture's January clock is active, the zone is New York, and no appointment exists.
  • Input: Local start 2026-07-15T09:00.
  • Steps: Create the appointment, inspect its saved fields, change the viewing zone to UTC, and open the editor. Save without editing the schedule.
  • Expected result: The start remains 2026-07-15T13:00:00.000Z, with original zone New York and local start 09:00. UTC viewing shows 13:00 in UTC; the editor shows the saved New York schedule. The end is 2026-07-15T14:00:00.000Z.

Test case 8: Reject a local time inside the spring gap

  • Preconditions: The appointment fixture is active with no saved appointment or confirmation.
  • Input: Local start 2026-03-08T02:30, zone New York.
  • Steps: Submit the selection and inspect the response, appointment records, and confirmation output.
  • Expected result: The request reports a nonexistent local time. No appointment or confirmation is created, including an automatically shifted 03:30 appointment.

Test case 9: Require an occurrence choice for a repeated time

  • Preconditions: The appointment fixture is active with no saved appointment.
  • Input: Local start 2026-11-01T01:30, zone New York, with no occurrence choice.
  • Steps: Submit through the API, then inspect validation feedback and saved state.
  • Expected result: The request asks for disambiguation and creates no appointment or confirmation. Neither possible instant is selected implicitly under this contract.

Test case 10: Resolve the earlier and later occurrences separately

  • Preconditions: Reset the appointment fixture between the two independent runs.
  • Inputs: Local start 2026-11-01T01:30 in New York with the earlier choice, then with the later choice.
  • Steps: Save each selection and inspect the local start, zone, offset, and UTC start returned and retained after reload.
  • Expected result: Earlier resolves to offset -04:00 and 2026-11-01T05:30:00.000Z. Later resolves to offset -05:00 and 2026-11-01T06:30:00.000Z. The two resolved starts differ by exactly 60 minutes.

Test case 11: Measure duration across the repeated hour

  • Preconditions: Create the earlier New York 01:30 appointment from case 10 with its 60-minute elapsed duration.
  • Steps: Inspect the start and end instants, calculate their difference, and compare the local display with its offsets.
  • Expected result: Start is 2026-11-01T05:30:00.000Z; end is 2026-11-01T06:30:00.000Z. Duration is 3,600,000 milliseconds. The local labels are 01:30 at -04:00 and 01:30 at -05:00, with enough context to distinguish them.

Test case 12: Select the correct events for a 23-hour report day

  • Preconditions: Seed the report's 12 events and select New York as the report zone.
  • Input: Report date 2026-03-08.
  • Steps: Request the report and inspect the derived interval, ordered identifiers, and count.
  • Expected result: Start is 2026-03-08T05:00:00.000Z; exclusive end is 2026-03-09T04:00:00.000Z. Only S1, S2, S3, and S4 appear, in that order, once each. Count is 4; elapsed interval length is 23 hours.

Test case 13: Keep both occurrences in a 25-hour report day

  • Preconditions: Use the report fixtures with New York selected.
  • Input: Report date 2026-11-01.
  • Steps: Request the report and inspect bounds, ordered identifiers, and both local 01:30 events.
  • Expected result: Start is 2026-11-01T04:00:00.000Z; exclusive end is 2026-11-02T05:00:00.000Z. Only F1, F2, F3, and F4 appear, once each. Count is 4 and interval length is 25 hours. Both repeated-time events remain present.

Test case 14: Join adjacent daily reports without duplicating a boundary

  • Preconditions: Use the report fixtures with New York selected.
  • Inputs: March 8 followed by March 9, and November 1 followed by November 2, all in 2026.
  • Steps: Request each neighboring pair and compare the first interval's end with the second interval's start and the returned identifiers.
  • Expected result: Each pair shares one boundary instant with exclusive ownership by the second day. March 9 contains only S5; November 2 contains only F5. Neither boundary event appears in its preceding day's results.

Test case 15: Preserve the report contract through viewing and export

  • Preconditions: Load the March 8 New York report containing S1, S2, S3, and S4.
  • Steps: Change only the browser or viewing zone to UTC and reload without changing the report-zone control. Export the report and inspect the CSV. Then explicitly change the report zone to UTC and request March 8 again.
  • Expected result: The viewing change preserves the New York bounds and four identifiers. The export has exactly those four event rows, their original UTC timestamps, report_date equal to 2026-03-08, and New York as report_zone. The explicit report-zone change instead produces UTC-midnight bounds and identifiers S0, S1, S2, and S3, also with count 4.

Common date and time testing mistakes

  • Checking text without its meaning: Matching 01:30 labels do not establish that two records refer to the same instant. Capture the offset and resolved instant where the feature uses them.
  • Letting an invalid date normalize silently: Check saved state after rejection so a corrected-looking display does not hide an unwanted write.
  • Using one environment zone for every layer: Vary client, service, account, and explicit business settings independently. Record which one owns each decision.
  • Treating a local day as a fixed duration: Resolve both calendar boundaries using the requested zone rather than copying an ordinary day's elapsed length.
  • Counting report rows without comparing identifiers: The spring New York and UTC fixtures both return four rows, with different membership.
  • Changing only the browser clock for a server cutoff: Control the clock at the layer that evaluates the rule and record that evaluation event.
  • Hiding a product decision inside a test helper: Automatic gap adjustment or an earlier-occurrence default must come from the agreed contract, not an unnoticed helper setting.
  • Reusing one transition date for every zone: Choose transition fixtures from the supported zone's rules and record the data used to derive them.

FAQ

UTC identifies the resolved instant, but a feature may also need the original local schedule and named zone for editing, recurrence, or a policy about future rule changes. Test the information the feature promises to retain. The appointment example saves both the scheduling context and the resolved instant.

No. The New York examples use a one-hour change, but that fixture is not a general rule for all zones or historical periods. Derive transitions and local-day boundaries from the supported zone's applicable data rather than hard-coding a one-hour adjustment into every expectation.

Ready to turn this guide into a working QA project with statuses, comments, and CSV export?