-
Notifications
You must be signed in to change notification settings - Fork 210
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
Add RFC3339 timestamp #201
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
@aren55555 this PR was merged without the proper updates in the response code. |
@quetzyg yes I tried this last night and it appeared supplying the annotation resulted in the time still being serialized as a numeric value rather than a string. Reverted it. |
I've corrected this in #204 |
This reverts commit c0ee6d2.
* Revert "Add RFC3339 timestamp (google#201)" (google#203) This reverts commit c0ee6d2. * RFC 3339 support for both Marshal and Unmarshal. (google#204) * RFC 3339 support for both Marshal and Unmarshal. * Post merge cleanup * Update request_test.go Co-authored-by: Quetzy Garcia <quetzy.garcia@integrate.com> * Update request.go Co-authored-by: Quetzy Garcia <quetzy.garcia@integrate.com> * Simplify the ISO 8601 logic. No need for the const rfc3339TimeFormat use time.RFC3339 directly. Co-authored-by: Quetzy Garcia <quetzy.garcia@integrate.com> * go mod init (google#205) * parent 89dd8d2 author Omar Ismail <oismail91@gmail.com> 1618325394 -0400 committer Omar Ismail <oismail91@gmail.com> 1618326429 -0400
@omarismail LGTM. I'm curious what you think about perhaps documenting these `iso8601` and `rfc3339` in the `Readme.md`? How did you find that this tag option/value existed? How can we make this better for others vs having to search the library implementation?
This reverts commit c0ee6d2.
Background
Go has a time format called RFC3339.
PR Description
This PR introduces the ability to add an annotation
jsonapi:"attr,next,rfc3339"
to atime.Time
attribute, and it will parse the time according to the Go RFC3339 time format.