Skip to content

DateTimeOffset bounds and elements accept +0530 and +5:30, which the docs and the sibling types refuse #234

Closed

Description

@CaffeinatedCoder

Problem

DateTimeOffsetRange (and DateTimeOffsetSet) accept offset spellings the docs say are refused, while their siblings refuse them:

docs/serialization.md:150 says the offset "needs a Z, ±HH, ±HH:mm or ±HH:mm:ss", and docs/migration.md:603 says "+0530 and +5:30 are rejected". PostgreSQL reads all of them, and where the library accepts one, the instant matches. So this is no wrong value, but it contradicts the stated grammar and the sibling types. Found by the pre-tag analysis (#179), part B. Most likely older than 10.0.0.

The decision follows the docs and siblings: refuse them (a tightening, so it goes in this major).

Change

Validate the offset text against the ISO forms before handing it to the BCL parser, on every entry point.

Done when

+0530, +5:30, +1430 and +1530 rows are in DateTimeOffset_Rejects and the timestamptz corpus in LiteralCorpusProbeTests, failing with the pre-check removed. The changelog lists it under "what can break you".

Activity

  1. added this to the 10.0.0 milestone on Oct 18, 2026
  2. added
    bug
    breaking
    area/literals
    package/core
    severity/low
    on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/literalsbreakingbugpackage/coreseverity/low

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions