Skip to content

Main content

Time Zone Offset Transition Record Audit

Supplied synthetic civil-second offset observations only, no IANA database, DST rule inference or leap seconds; audit transition chronological order, duplicate instants and adjacent before/after offset continuity without sorting or repairing.

Loading tool…

Description

Audit transition chronological order, duplicate instants and adjacent before/after offset continuity without sorting or repairing.

An offset maps a supplied UTC coordinate to local civil coordinates by local = UTC + offset. Half-open spans include their start and exclude their end. A forward offset jump can leave local coordinates uncovered; a backward jump can give several UTC interpretations of one local value. These tools use explicit synthetic civil-second observations rather than a named-zone database.

Audit transition chronological order, duplicate instants and adjacent before/after offset continuity without sorting or repairing.

When to use this tool

Use this tool to audit transition chronological order, duplicate instants and adjacent before/after offset continuity without sorting or repairing.

How to use the tool and how it works

  1. Enter transitionsJson using the definitions below. Serialize JSON text fields in the decoded shape shown below.
  2. Run the operation. Resolve input-format errors before interpreting an output.
  3. Read result.duplicateInstants, result.nonIncreasing, result.discontinuous, using the stated boundary, ordering, sign and absence conventions.

Group equal transition instants with all source indexes, report each later index with at≤previous.at, and separately report later before values differing from the previous after.1

Input fieldMeaning and unitsAccepted input
transitionsJsonJSON array of {at,before,after} second-valued observations; at is UTC and before/after are signed offsets.Text, at most 8,192 UTF-16 code units; narrower grammar/range rules also apply.

These decoded structures show the examples inside JSON text fields. Supply their serialized JSON strings as input.

json
{
  "transitionsJson": [
    {
      "at": 10,
      "before": 0,
      "after": 2
    },
    {
      "at": 20,
      "before": 2,
      "after": 0
    }
  ]
}
Output fieldInterpretation
resultObject containing the fields below.
result.duplicateInstantsGroups of equal instant spellings with all original occurrence indexes.
result.nonIncreasingLater transition indexes whose instant does not strictly increase.
result.discontinuousLater transition indexes whose before offset differs from the previous after offset.
json
{
  "input": {
    "transitionsJson": "[{\"at\": 10, \"before\": 0, \"after\": 2}, {\"at\": 20, \"before\": 2, \"after\": 0}]"
  },
  "output": {
    "result": {
      "duplicateInstants": [],
      "nonIncreasing": [],
      "discontinuous": []
    }
  }
}

Limitations and assumptions

  • This audit reports supplied-order inconsistencies and does not sort, repair or infer an initial offset.
  • Span/transition coordinates are finite seconds within ±10¹² and offsets within ±86,400 seconds. Spans require start<end. No IANA database, calendar parsing, daylight-saving inference or leap seconds are included.
  • Every declared outer field is required and unknown outer fields are rejected. Strings and JSON text have size limits, lists are bounded to 128 entries, and JSON nesting/node counts are bounded. Tighter operation-specific bounds stated above take precedence.
  • Ordinary numeric outputs must be finite and within safe-integer magnitude. Exact large lengths/counts use decimal strings. Original record indexes and code-unit positions are zero-based; span ends are exclusive unless stated otherwise.

Alternative or Complementary methods

Keep all timestamps on one origin and in seconds, and retain gaps or competing observations. Use a maintained time-zone library when real dates, named zones or historical rules are required.

References

  1. Tool behavior and example: Time Zone Offset Transition Record Audit — tool.io

Similar or alternative tools