Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CE timestamps should be returned as Time objects, not strings #66

Open
ace-n opened this issue Jan 28, 2021 · 4 comments · May be fixed by #169
Open

CE timestamps should be returned as Time objects, not strings #66

ace-n opened this issue Jan 28, 2021 · 4 comments · May be fixed by #169
Labels
enhancement New feature or request P3

Comments

@ace-n
Copy link
Contributor

ace-n commented Jan 28, 2021

As requested by @grayside in this PR.

@ace-n ace-n added the enhancement New feature or request label Jan 28, 2021
@grant grant removed their assignment Jan 28, 2021
@grayside grayside removed their assignment Mar 18, 2021
@grayside
Copy link

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.

@ace-n
Copy link
Contributor Author

ace-n commented Mar 18, 2021

cc @bshaffer

@bshaffer
Copy link
Collaborator

What is the format used by CloudEvents to convert to and from?

@grant
Copy link
Contributor

grant commented Mar 19, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants