cosmos-sdk/tx/textual/internal/testdata/timestamp.json
Jim Larson ef4ad67c9e
feat: value renderer for timestamp protos (#12860)
## Description

Closes: #12709



Part of Sign Mode Textual (ADR 050) implementation.

Renders Timestamp messages as RFC 3339 (simplified ISO 8601).

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
2022-08-23 19:58:29 +00:00

83 lines
2.1 KiB
JSON

[
{
"proto": {"seconds": 1136214245},
"text": "2006-01-02T15:04:05Z"
},
{
"proto": {"seconds": 1136214245, "nanos": 123456789},
"text": "2006-01-02T15:04:05.123456789Z"
},
{
"proto": {"seconds": 1136214245, "nanos": 123000000},
"text": "2006-01-02T15:04:05.123Z"
},
{ "text": "", "error": true },
{ "text": " ", "error": true },
{ "text": "garbage", "error": true },
{ "text": "11/30/2007", "error": true },
{
"proto": {"seconds": 0, "nanos": 0},
"text": "1970-01-01T00:00:00Z"
},
{
"proto": {"seconds": 0, "nanos": 1},
"text": "1970-01-01T00:00:00.000000001Z"
},
{
"proto": {"seconds": 0, "nanos": 10},
"text": "1970-01-01T00:00:00.00000001Z"
},
{
"proto": {"seconds": 0, "nanos": 100},
"text": "1970-01-01T00:00:00.0000001Z"
},
{
"proto": {"seconds": 0, "nanos": 1000},
"text": "1970-01-01T00:00:00.000001Z"
},
{
"proto": {"seconds": 0, "nanos": 10000},
"text": "1970-01-01T00:00:00.00001Z"
},
{
"proto": {"seconds": 0, "nanos": 100000},
"text": "1970-01-01T00:00:00.0001Z"
},
{
"proto": {"seconds": 0, "nanos": 1000000},
"text": "1970-01-01T00:00:00.001Z"
},
{
"proto": {"seconds": 0, "nanos": 10000000},
"text": "1970-01-01T00:00:00.01Z"
},
{
"proto": {"seconds": 0, "nanos": 100000000},
"text": "1970-01-01T00:00:00.1Z"
},
{
"proto": {"seconds": 0, "nanos": 999999999},
"text": "1970-01-01T00:00:00.999999999Z"
},
{
"proto": {"seconds": 1, "nanos": 0},
"text": "1970-01-01T00:00:01Z"
},
{
"proto": {"seconds": 2, "nanos": 0},
"text": "1970-01-01T00:00:02Z"
},
{
"proto": {"seconds": 2, "nanos": 6},
"text": "1970-01-01T00:00:02.000000006Z"
},
{
"proto": {"seconds": 1657797740, "nanos": 983000000},
"text": "2022-07-14T11:22:20.983Z"
},
{
"proto": {"seconds": -1, "nanos": 0},
"text": "1969-12-31T23:59:59Z"
}
]