]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / aws / aws-sdk-go / private / protocol / query / queryutil / queryutil.go
index 524ca952adfd62538dd442339464f9e6c58392cb..75866d01218425b2d2bf15f5a6c29fca401f9c5e 100644 (file)
@@ -121,6 +121,10 @@ func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string
                return nil
        }
 
+       if _, ok := value.Interface().([]byte); ok {
+               return q.parseScalar(v, value, prefix, tag)
+       }
+
        // check for unflattened list member
        if !q.isEC2 && tag.Get("flattened") == "" {
                if listName := tag.Get("locationNameList"); listName == "" {
@@ -229,7 +233,12 @@ 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))
+               format := tag.Get("timestampFormat")
+               if len(format) == 0 {
+                       format = protocol.ISO8601TimeFormatName
+               }
+
+               v.Set(name, protocol.FormatTime(format, value))
        default:
                return fmt.Errorf("unsupported value for param %s: %v (%s)", name, r.Interface(), r.Type().Name())
        }