aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go')
-rw-r--r--vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go14
1 files changed, 8 insertions, 6 deletions
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