Skip to content

Timestamp parsing does not fully support RFC 3339 #709

Open
cloudevents/spec
#1410

Description

@marian-varga

https://github.com/cloudevents/sdk-java/blob/main/api/src/main/java/io/cloudevents/types/Time.java uses the OffsetDateTime parse method to parse timestamps. However, the RFC 3399 specification allows the use of spaces instead of a "T" in the ISO format:
https://datatracker.ietf.org/doc/html/rfc3339#section-5.6

Activity

  1. Cali0707 commented on Nov 12, 2026

    @Cali0707
    Contributor

    @duglin any opinions here? My read on the note in the spec is that this is an optional thing that applications may opt into, and in other lanugage ecosystems (and the default here), the space formatting is not considered valid.

    IMO we should clarify this at the spec level and then make it consistent between SDKs

  2. duglin commented on Nov 12, 2026

    @duglin
    Contributor

    From RFC3339:

          NOTE: ISO 8601 defines date and time separated by "T".
          Applications using this syntax may choose, for the sake of
          readability, to specify a full-date and full-time separated by
          (say) a space character.
    

    wow - talk about hurting interop. I think we should clarify that "T" MUST be used - I'll bring this up with the group.

  3. duglin commented on Nov 12, 2026

    @duglin
    Contributor

    I love the "say" word in there too... leaves it open for any char to be used. Amazing

  4. duglin commented on Nov 12, 2026

    @duglin
    Contributor

    @marian-varga I opened cloudevents/spec#1410 to clarify the spec. Thanks so much for noticing. Small favor... in the future if you notice more spec-related issues please open an issue in the spec repo so it doesn't get lost in the SDK workload. thanks again!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions