---
name: normalise-event-times
description: "Convert timestamps from logs, systems or people in different time zones to one UTC timeline, keeping ambiguous or offset-free local times unresolved instead of guessing. Use when someone needs to line up events across time zones, order incident logs or convert event times to UTC."
license: CC-BY-4.0
metadata:
  author: Raq.com
  version: "2026-11-22"
  homepage: https://skills.raq.com/skills/normalise-event-times
---

# Put event records on one UTC timeline

Reconcile timestamped observations from different offsets without assigning a time zone to an unlabelled local clock.

## When to use this skill

- Someone has log lines or event records from servers, apps or offices using different UTC offsets and wants them in one order.
- An incident timeline mixes Z timestamps, numeric offsets and local wall-clock times.
- Events fall near a daylight saving change and someone needs to know which can be placed exactly.

## When not to use it

- Deciding what caused what. Ordering by recorded time shows sequence, not cause.
- Correcting clock drift between machines without evidence such as time-sync logs or a shared reference event. Ask for the correction and the records it applies to.
- Deadlines where a law or contract sets the time zone. Check the governing rule rather than converting by assumption.

## What you need

- Uniquely labelled records with original timestamps, preserving numeric offsets and fractional seconds.
- Any externally established timezone or clock corrections, their scope and the required output precision.

## Ask before you start

If any of these are missing or unclear, ask before doing the work.

- Where does each record come from, and do any systems log local time without an offset? Their time zone has to be established, not assumed.
- Is there an IANA time zone (such as Europe/London) or a documented offset for each local clock, and does it apply on the event dates?
- Are any clocks known to be wrong, and by how much? A correction applies only to the records it was measured for.
- What precision is needed, such as whole seconds or milliseconds?

## Method

1. Parse each record on its own and keep the original string beside the result. Record the date, time, fractional seconds and offset exactly as given.
2. For a timestamp with a numeric offset, UTC is the local time minus the offset: 00:10+02:00 is 22:10Z on the previous day. Carry date changes across midnight and month ends. Z, +00:00 and -00:00 all give the same instant; -00:00, and Z under RFC 9557, mean the local offset was not known.
3. For a local time without an offset, use only a supplied IANA time zone and that zone's rules on the event date from the tz database, not today's offset. With no zone, the time is unresolved.
4. At a daylight saving change a local time may not exist (a gap, when clocks go forward) or may occur twice (a fold, when clocks go back). Keep it unresolved unless independent evidence, such as an offset in the same record, selects one instant. Never shift a nonexistent time silently.
5. If a timestamp carries both an offset and an RFC 9557 time zone suffix such as [Europe/London], check that they agree on that date and report any inconsistency rather than choosing silently.
6. Sort the placed instants chronologically, keeping input order for equal instants, and say that equal times show no sequence. Write each in RFC 3339 UTC with seconds and a Z suffix, keeping fractional seconds only when they are not zero.
7. List unresolved records separately in source order, with what would resolve each, and note any known clock uncertainty beside the timeline.

## Checks before you deliver

- Sorting timestamp text is reliable only under strict conditions, including a consistent offset and fractional precision.
- Guessing today's timezone offset for a historical date can move the event across another observation.
- Treating a bare local time as UTC, or as the analyst's own zone, can move it by hours. It stays unresolved until its zone is known.
- Adding the offset instead of subtracting it is an easy slip. Check one known pair: 12:00+01:00 is 11:00Z.
- Rounding or cutting fractional seconds can reorder events logged within the same second. Keep the precision given until sorting is done.

## How to present the result

Start with how many records were placed and how many are unresolved. Then give the timeline as a table in UTC order with the record ID, the UTC time, the original timestamp and its source. After it, list unresolved records with the reason (no zone, nonexistent time or repeated hour) and what would resolve each, and note any equal times and clock corrections applied.

## Worked example

**Request:** Order the events by their recorded instant.

**Supplied material:**

```text
A|2026-04-02T00:10:00+02:00
B|2026-04-01T23:00:00Z
C|2026-04-01T19:00:00-04:00
```

**Answer:** In UTC, A occurred on 1 April 2026 at 22:10. B and C both have the instant 23:00 that day. Their printed order breaks the tie and establishes no sequence between them.

## Structured output for tests

For an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.

Return timeline as objects with id and utc (RFC 3339, Z suffix, seconds included, omit zero fractional seconds). Return unresolved as record IDs in source order. On equal instants keep input order.

## Sources

- [RFC 3339, date and time on the Internet](https://www.rfc-editor.org/rfc/rfc3339.html): Defines the Internet timestamp format with numeric offsets, the -00:00 convention for a known UTC time with an unknown local offset, and the conditions (same offset form and same number of fractional digits) under which timestamps sort correctly as text.
- [RFC 9557, timestamps with additional information](https://www.rfc-editor.org/rfc/rfc9557.html): Updates RFC 3339 so that Z, like -00:00, means the UTC time is known but the local offset is not, while +00:00 keeps UTC as the preferred reference. It adds bracketed time zone suffixes and says what to do when a suffix and an offset disagree.
- [PEP 495, local time disambiguation](https://peps.python.org/pep-0495/): Python's accepted proposal names the two cases at a clock change: a gap when clocks move forward, whose local times are missing, and a fold when they move back, whose local times are ambiguous. The skill uses these terms and keeps both unresolved.

Test cases and an answer checker for this skill: https://skills.raq.com/skills/normalise-event-times
