functions-framework-php
functions-framework-php copied to clipboard
CE timestamps should be returned as Time objects, not strings
To clarify, the CloudEvent implementation in the Functions Framework currently returns a string timestamp. It would be useful if it returned a structured time object.
cc @bshaffer
What is the format used by CloudEvents to convert to and from?
This is an example time attribute HTTP header:
ce-time: "2020-04-07T17:57:33.647Z"
https://github.com/cloudevents/spec/blob/v1.0/spec.md#time https://tools.ietf.org/html/rfc3339
Maybe DateTime::createFromFormat the property? I assume a type change would be a breaking change?