From f8e3dea19012ccf05965d10255789eec33c2ebcf Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Thu, 23 Aug 2018 22:51:21 +0100 Subject: Update deps --- .../aws/aws-sdk-go/private/protocol/rest/build.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go') diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go index f761e0b..b34f525 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go @@ -20,11 +20,6 @@ import ( "github.com/aws/aws-sdk-go/private/protocol" ) -// RFC1123GMT is a RFC1123 (RFC822) formated timestame. This format is not -// using the standard library's time.RFC1123 due to the desire to always use -// GMT as the timezone. -const RFC1123GMT = "Mon, 2 Jan 2006 15:04:05 GMT" - // Whether the byte value can be sent without escaping in AWS URLs var noEscape [256]bool @@ -272,7 +267,14 @@ 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) + format := tag.Get("timestampFormat") + if len(format) == 0 { + format = protocol.RFC822TimeFormatName + if tag.Get("location") == "querystring" { + format = protocol.ISO8601TimeFormatName + } + } + str = protocol.FormatTime(format, value) case aws.JSONValue: if len(value) == 0 { return "", errValueNotSet -- cgit v1.2.3