{"skills":[{"name":"Put event records on one UTC timeline","description":"Reconcile timestamped observations from different offsets without assigning a time zone to an unlabelled local clock.","content":"# Put event records on one UTC timeline\n\nReconcile timestamped observations from different offsets without assigning a time zone to an unlabelled local clock.\n\n## When to use this skill\n\n- Someone has log lines or event records from servers, apps or offices using different UTC offsets and wants them in one order.\n- An incident timeline mixes Z timestamps, numeric offsets and local wall-clock times.\n- Events fall near a daylight saving change and someone needs to know which can be placed exactly.\n\n## When not to use it\n\n- Deciding what caused what. Ordering by recorded time shows sequence, not cause.\n- 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.\n- Deadlines where a law or contract sets the time zone. Check the governing rule rather than converting by assumption.\n\n## What you need\n\n- Uniquely labelled records with original timestamps, preserving numeric offsets and fractional seconds.\n- Any externally established timezone or clock corrections, their scope and the required output precision.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- 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.\n- 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?\n- Are any clocks known to be wrong, and by how much? A correction applies only to the records it was measured for.\n- What precision is needed, such as whole seconds or milliseconds?\n\n## Method\n\n1. 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.\n2. 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.\n3. 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.\n4. 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.\n5. 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.\n6. 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.\n7. List unresolved records separately in source order, with what would resolve each, and note any known clock uncertainty beside the timeline.\n\n## Checks before you deliver\n\n- Sorting timestamp text is reliable only under strict conditions, including a consistent offset and fractional precision.\n- Guessing today's timezone offset for a historical date can move the event across another observation.\n- 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.\n- Adding the offset instead of subtracting it is an easy slip. Check one known pair: 12:00+01:00 is 11:00Z.\n- Rounding or cutting fractional seconds can reorder events logged within the same second. Keep the precision given until sorting is done.\n\n## How to present the result\n\nStart 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.\n\n## Worked example\n\n**Request:** Order the events by their recorded instant.\n\n**Supplied material:**\n\n```text\nA|2026-04-02T00:10:00+02:00\nB|2026-04-01T23:00:00Z\nC|2026-04-01T19:00:00-04:00\n```\n\n**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.\n\n## Structured output for tests\n\nFor 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.\n\nReturn 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.\n\n## Sources\n\n- [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.\n- [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.\n- [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.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/normalise-event-times\n","scope":"contextual","trigger_keywords":["Put event records on one UTC timeline","normalise-event-times","normalise event times","Can you put these logs from different time zones in the right order?","Can you put these logs from different time zones in the right order","event times across time zones","convert these event times","event times in utc"],"is_private":true,"is_active":true,"scripts":[{"name":"normalise-event-times-check","description":"Compare a saved JSON answer with a published test. Pass tests\/case-1\/expected.json (or another case) and the path to your answer.","language":"python","filename":"normalise-event-times-check.py","content":"from pathlib import Path\nimport runpy\n\nrunpy.run_path(str(Path(__file__).parent \/ 'tests' \/ 'check.py'), run_name='__main__')\n","supporting_files":[{"path":"SKILL.md","content":"---\nname: normalise-event-times\ndescription: \"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.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/normalise-event-times\n---\n\n# Put event records on one UTC timeline\n\nReconcile timestamped observations from different offsets without assigning a time zone to an unlabelled local clock.\n\n## When to use this skill\n\n- Someone has log lines or event records from servers, apps or offices using different UTC offsets and wants them in one order.\n- An incident timeline mixes Z timestamps, numeric offsets and local wall-clock times.\n- Events fall near a daylight saving change and someone needs to know which can be placed exactly.\n\n## When not to use it\n\n- Deciding what caused what. Ordering by recorded time shows sequence, not cause.\n- 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.\n- Deadlines where a law or contract sets the time zone. Check the governing rule rather than converting by assumption.\n\n## What you need\n\n- Uniquely labelled records with original timestamps, preserving numeric offsets and fractional seconds.\n- Any externally established timezone or clock corrections, their scope and the required output precision.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- 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.\n- 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?\n- Are any clocks known to be wrong, and by how much? A correction applies only to the records it was measured for.\n- What precision is needed, such as whole seconds or milliseconds?\n\n## Method\n\n1. 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.\n2. 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.\n3. 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.\n4. 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.\n5. 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.\n6. 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.\n7. List unresolved records separately in source order, with what would resolve each, and note any known clock uncertainty beside the timeline.\n\n## Checks before you deliver\n\n- Sorting timestamp text is reliable only under strict conditions, including a consistent offset and fractional precision.\n- Guessing today's timezone offset for a historical date can move the event across another observation.\n- 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.\n- Adding the offset instead of subtracting it is an easy slip. Check one known pair: 12:00+01:00 is 11:00Z.\n- Rounding or cutting fractional seconds can reorder events logged within the same second. Keep the precision given until sorting is done.\n\n## How to present the result\n\nStart 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.\n\n## Worked example\n\n**Request:** Order the events by their recorded instant.\n\n**Supplied material:**\n\n```text\nA|2026-04-02T00:10:00+02:00\nB|2026-04-01T23:00:00Z\nC|2026-04-01T19:00:00-04:00\n```\n\n**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.\n\n## Structured output for tests\n\nFor 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.\n\nReturn 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.\n\n## Sources\n\n- [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.\n- [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.\n- [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.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/normalise-event-times\n"},{"path":"LICENSE.txt","content":"Original Raq.com instructions and synthetic examples: CC BY 4.0.\nhttps:\/\/creativecommons.org\/licenses\/by\/4.0\/\nAttribution: Raq.com, https:\/\/skills.raq.com\/skills\/normalise-event-times\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# Midnight in two offices\n\nOrder the events by their recorded instant.\n\n## Supplied material\n\nA|2026-04-02T00:10:00+02:00\nB|2026-04-01T23:00:00Z\nC|2026-04-01T19:00:00-04:00\n\n## Worked answer\n\nIn 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.\n\n## Reasoning\n\nA crosses the UTC date boundary. B and C are two labels for the same instant.\n"},{"path":"tests\/check.py","content":"\"\"\"Check a saved agent answer locally with Python 3 (standard library only).\"\"\"\nimport json\nimport math\nimport sys\nfrom pathlib import Path\n\n\ndef compare(expected, actual, path=\"$\", accepted=None):\n    if isinstance(expected, bool) or isinstance(actual, bool):\n        if expected is not actual:\n            yield path\n    elif isinstance(expected, (int, float)) and isinstance(actual, (int, float)):\n        if not math.isclose(expected, actual, rel_tol=0, abs_tol=1e-8):\n            yield path\n    elif isinstance(expected, dict) and isinstance(actual, dict):\n        for key in sorted(set(expected) | set(actual)):\n            if key not in expected or key not in actual:\n                yield f\"{path}.{key}\"\n            elif not any(\n                not list(compare(option, actual[key]))\n                for option in (accepted or {}).get(key, [])\n            ):\n                yield from compare(expected[key], actual[key], f\"{path}.{key}\")\n    elif isinstance(expected, list) and isinstance(actual, list):\n        if len(expected) != len(actual):\n            yield f\"{path} (length)\"\n        for i, (left, right) in enumerate(zip(expected, actual)):\n            yield from compare(left, right, f\"{path}[{i}]\")\n    elif type(expected) != type(actual) or expected != actual:\n        yield path\n\n\ndef main():\n    if len(sys.argv) != 3:\n        raise SystemExit(\"Usage: python3 check.py expected.json answer.json\")\n    try:\n        expected, actual = [json.loads(Path(p).read_text(encoding=\"utf-8\")) for p in sys.argv[1:]]\n        alternatives = Path(sys.argv[1]).with_name(\"accepted.json\")\n        accepted = json.loads(alternatives.read_text(encoding=\"utf-8\")) if alternatives.is_file() else {}\n    except (ValueError, OSError) as error:\n        raise SystemExit(str(error))\n    differences = list(compare(expected, actual, accepted=accepted))\n    if differences:\n        raise SystemExit(\"Different fields: \" + \", \".join(differences))\n    print(\"Pass\")\n\n\nif __name__ == \"__main__\":\n    main()\n"},{"path":"tests\/README.md","content":"Give your agent SKILL.md and one request.txt in a fresh session. Keep the expected answer aside. Save the reply as answer.json, then run this from the tests folder:\n\n    python3 check.py case-1\/expected.json answer.json\n\nEach case also has an explanation. Where accepted.json exists, the checker accepts the alternatives listed there.\n"},{"path":"tests\/case-1\/request.txt","content":"Order the events by their recorded instant.\nReturn only the JSON specified in SKILL.md for this test.\n\nA|2026-04-02T00:10:00+02:00\nB|2026-04-01T23:00:00Z\nC|2026-04-01T19:00:00-04:00\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"timeline\": [\n        {\n            \"id\": \"A\",\n            \"utc\": \"2026-04-01T22:10:00Z\"\n        },\n        {\n            \"id\": \"B\",\n            \"utc\": \"2026-04-01T23:00:00Z\"\n        },\n        {\n            \"id\": \"C\",\n            \"utc\": \"2026-04-01T23:00:00Z\"\n        }\n    ],\n    \"unresolved\": []\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"A crosses the UTC date boundary. B and C are two labels for the same instant.\n"},{"path":"tests\/case-2\/request.txt","content":"Order what can be placed on a timeline. No timezone mapping is available for the kiosk.\nReturn only the JSON specified in SKILL.md for this test.\n\nM|2026-10-25T01:20:00\nN|2026-10-25T01:10:00-00:00\nP|2026-10-25T01:10:00+01:00\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"timeline\": [\n        {\n            \"id\": \"P\",\n            \"utc\": \"2026-10-25T00:10:00Z\"\n        },\n        {\n            \"id\": \"N\",\n            \"utc\": \"2026-10-25T01:10:00Z\"\n        }\n    ],\n    \"unresolved\": [\n        \"M\"\n    ]\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"The kiosk's wall time is ambiguous. The -00:00 record still specifies a UTC instant.\n"},{"path":"tests\/case-3\/request.txt","content":"Normalize the event log using Europe\/Dublin. No rule shifts invalid times or resolves repeated ones.\nReturn only the JSON specified in SKILL.md for this test.\n\nA|2025-03-30T01:30:00\nB|2025-10-26T01:30:00\nC|2025-10-26T01:30:00+01:00\n"},{"path":"tests\/case-3\/expected.json","content":"{\n    \"timeline\": [\n        {\n            \"id\": \"C\",\n            \"utc\": \"2025-10-26T00:30:00Z\"\n        }\n    ],\n    \"unresolved\": [\n        \"A\",\n        \"B\"\n    ]\n}\n"},{"path":"tests\/case-3\/explanation.txt","content":"The March wall time never occurred. The October wall time occurred twice, and only C specifies which offset to use.\n"}],"is_active":true,"is_approved":false}]}]}