Skip to content

Main content

Time Zone Local Event Order Witness

Supplied synthetic civil-second offset observations only, no IANA database, DST rule inference or leap seconds; retain UTC versus local-coordinate order witnesses from paired event offsets; no reordering or claim that fold observations are corrupt.

Loading tool…

Description

Retain UTC versus local-coordinate order witnesses from paired event offsets; no reordering or claim that fold observations are corrupt.

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.

Retain UTC versus local-coordinate order witnesses from paired event offsets; no reordering or claim that fold observations are corrupt.

When to use this tool

Use this tool to retain UTC versus local-coordinate order witnesses from paired event offsets; no reordering or claim that fold observations are corrupt.

How to use the tool and how it works

  1. Enter utc, offsets using the definitions below.
  2. Run the operation. Resolve input-format errors before interpreting an output.
  3. Read result.local, result.utcDescending, result.localDescending, using the stated boundary, ordering, sign and absence conventions.

Require aligned UTC and offset lists. Compute local[j]=utc[j]+offsets[j], then separately report later indexes where UTC or local values strictly decrease.1

Input fieldMeaning and unitsAccepted input
utcExplicit UTC observation coordinates in seconds within ±10¹².Dense list of at most 128 finite numbers, under the stated integer/range rules.
offsetsSigned offset seconds within ±86,400, aligned one-to-one with utc.Dense list of at most 128 finite numbers, under the stated integer/range rules.
Output fieldInterpretation
resultObject containing the fields below.
result.localInput-order UTC+offset local second coordinates.
result.utcDescendingLater source indexes with strictly decreasing UTC observations.
result.localDescendingLater source indexes with strictly decreasing local observations.
json
{
  "input": {
    "utc": [
      19,
      20
    ],
    "offsets": [
      2,
      0
    ]
  },
  "output": {
    "result": {
      "local": [
        21,
        20
      ],
      "utcDescending": [],
      "localDescending": [
        1
      ]
    }
  }
}

Limitations and assumptions

  • Equal values are not descending. Local order can reverse across a backward offset change even when UTC order increases.
  • 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 Local Event Order Witness — tool.io

Similar or alternative tools