Skip to content

Equate the Z and +00:00 spellings of UTC when comparing temporal lite… - #132

Open
bryantaustin13 wants to merge 1 commit into
mainfrom
utc-designator-equivalence
Open

bryantaustin13 wants to merge 1 commit into
mainfrom
utc-designator-equivalence

Conversation

@bryantaustin13

Copy link
Copy Markdown
Contributor

…rals

ISO 8601 allows UTC to be written either as Z or as +00:00, and the two denote the same instant. A test declaring one spelling failed against an engine that returned the other, purely on notation.

ToDateTime('2014-01-01T12:05:05.955Z') is the case in the suite: the engine returns valueDateTime "2014-01-01T12:05:05.955Z", which the test declares as @2014-01-01T12:05:05.955+00:00. The value is right; only the offset is spelled differently.

Normalizing happens in the comparison rather than in the extractor, so the value is still reported exactly as the engine returned it — cql-test-results documents that actuals are never reformatted, and rewriting the extracted value would have changed what appears in the report.

The rule is deliberately narrow: both sides must be @-prefixed CQL temporal literals ending in a UTC designator. A genuine String result of "Z", or an unprefixed timestamp string, is never rewritten. A non-UTC offset is not treated as UTC, and -00:00 is left unequal to +00:00 rather than guessed at.

…rals

ISO 8601 allows UTC to be written either as `Z` or as `+00:00`, and the two denote
the same instant. A test declaring one spelling failed against an engine that
returned the other, purely on notation.

ToDateTime('2014-01-01T12:05:05.955Z') is the case in the suite: the engine
returns valueDateTime "2014-01-01T12:05:05.955Z", which the test declares as
@2014-01-01T12:05:05.955+00:00. The value is right; only the offset is spelled
differently.

Normalizing happens in the comparison rather than in the extractor, so the value
is still reported exactly as the engine returned it — cql-test-results documents
that actuals are never reformatted, and rewriting the extracted value would have
changed what appears in the report.

The rule is deliberately narrow: both sides must be `@`-prefixed CQL temporal
literals ending in a UTC designator. A genuine String result of "Z", or an
unprefixed timestamp string, is never rewritten. A non-UTC offset is not treated
as UTC, and `-00:00` is left unequal to `+00:00` rather than guessed at.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@cmoesel

cmoesel commented Sep 1, 2026

Copy link
Copy Markdown
Member

Thanks. You can resolve #83 when this gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants