Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Conversation

xibz
Copy link
Contributor

@xibz xibz commented Jul 19, 2018

No description provided.

"BlobArgs": {
"shape": "BlobsType"
}
"BlobArgs": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tab/spaces are off.

@@ -233,7 +233,14 @@ func (q *queryParser) parseScalar(v url.Values, r reflect.Value, name string, ta
v.Set(name, strconv.FormatFloat(float64(value), 'f', -1, 32))
case time.Time:
const ISO8601UTC = "2006-01-02T15:04:05Z"
v.Set(name, value.UTC().Format(ISO8601UTC))
// Query ignores "defaultTimestampFormat" as that tag only
// applies to structured payload body values.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this comment is valid anymore

@@ -272,7 +267,16 @@ func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error)
case float64:
str = strconv.FormatFloat(value, 'f', -1, 64)
case time.Time:
str = value.UTC().Format(RFC1123GMT)
// REST ignores "defaultTimestampFormat" as that tag only
// applies to structured payload body values.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this comment is valid anymore

@@ -198,7 +198,13 @@ func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) erro
}
v.Set(reflect.ValueOf(&f))
case *time.Time:
t, err := time.Parse(time.RFC1123, header)
// REST ignores "defaultTimestampFormat" as that tag only
// applies to strucutred payload body values.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this comment is valid anymore

case ISO8601TimeFormatName:
str = t.Format(ISO8601TimeFormat)
case UnixTimeFormatName:
str = strconv.FormatInt(t.Unix(), 10)
Copy link
Contributor

@jasdel jasdel Jul 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit would prefer these cases all return their string since the str var isn't being used other than return a value.

@xibz xibz force-pushed the timestampFormat branch from 3df3446 to 2126ec9 Compare July 19, 2018 23:26
@xibz xibz merged commit bb991cd into aws:master Jul 20, 2018
xibz added a commit to xibz/aws-sdk-go that referenced this pull request Sep 12, 2018
* adding support for timestampFormat

* regenerating services

* Adding enums back

* fixing gofmt
usrenmae pushed a commit to usrenmae/aws-sdk-go that referenced this pull request Sep 23, 2018
* adding support for timestampFormat

* regenerating services

* Adding enums back

* fixing gofmt
jasdel pushed a commit to aws/aws-sdk-go-v2 that referenced this pull request Aug 20, 2019
Adds support for the timestampForamt API model trait to the V2 SDK. The SDK will now generate API client parameters with the correct time format for APIs modeled with custom time stamp formats specified.

V2 Port of aws/aws-sdk-go#2066
Fix #202
Fix #286
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants