This repository was archived by the owner on Sep 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Add RFC3339 timestamp #201
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
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. |
Contributor
Author
|
@googlebot I signed it! |
hoangmirs
approved these changes
Apr 2, 2021
Contributor
|
@aren55555 this PR was merged without the proper updates in the response code. |
aren55555
added a commit
that referenced
this pull request
Apr 3, 2021
Contributor
|
@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. |
Contributor
|
I've corrected this in #204 |
omarismail
pushed a commit
to hashicorp/jsonapi
that referenced
this pull request
Apr 13, 2021
This reverts commit c0ee6d2.
omarismail
added a commit
to hashicorp/jsonapi
that referenced
this pull request
Apr 13, 2021
* 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 <[email protected]> * Update request.go Co-authored-by: Quetzy Garcia <[email protected]> * Simplify the ISO 8601 logic. No need for the const rfc3339TimeFormat use time.RFC3339 directly. Co-authored-by: Quetzy Garcia <[email protected]> * go mod init (google#205) * parent 89dd8d2 author Omar Ismail <[email protected]> 1618325394 -0400 committer Omar Ismail <[email protected]> 1618326429 -0400
ctrombley
pushed a commit
to hashicorp/jsonapi
that referenced
this pull request
Jan 12, 2024
@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?
ctrombley
pushed a commit
to hashicorp/jsonapi
that referenced
this pull request
Jan 12, 2024
This reverts commit c0ee6d2.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.Timeattribute, and it will parse the time according to the Go RFC3339 time format.