Fix time format used for cloud orchestration
The format used to represent time is slightly different than RFC
standard and the one present in golang time lib.
diff --git a/openstack/orchestration/v1/stacks/results.go b/openstack/orchestration/v1/stacks/results.go
index 04d3f8e..dca06e4 100644
--- a/openstack/orchestration/v1/stacks/results.go
+++ b/openstack/orchestration/v1/stacks/results.go
@@ -100,7 +100,7 @@
thisStack := (rawStacks[i]).(map[string]interface{})
if t, ok := thisStack["creation_time"].(string); ok && t != "" {
- creationTime, err := time.Parse(time.RFC3339, t)
+ creationTime, err := time.Parse(gophercloud.STACK_TIME_FMT, t)
if err != nil {
return res.Stacks, err
}
@@ -108,7 +108,7 @@
}
if t, ok := thisStack["updated_time"].(string); ok && t != "" {
- updatedTime, err := time.Parse(time.RFC3339, t)
+ updatedTime, err := time.Parse(gophercloud.STACK_TIME_FMT, t)
if err != nil {
return res.Stacks, err
}
@@ -170,7 +170,7 @@
b := r.Body.(map[string]interface{})["stack"].(map[string]interface{})
if date, ok := b["creation_time"]; ok && date != nil {
- t, err := time.Parse(time.RFC3339, date.(string))
+ t, err := time.Parse(gophercloud.STACK_TIME_FMT, date.(string))
if err != nil {
return nil, err
}
@@ -178,7 +178,7 @@
}
if date, ok := b["updated_time"]; ok && date != nil {
- t, err := time.Parse(time.RFC3339, date.(string))
+ t, err := time.Parse(gophercloud.STACK_TIME_FMT, date.(string))
if err != nil {
return nil, err
}
@@ -249,7 +249,7 @@
b := r.Body.(map[string]interface{})["stack"].(map[string]interface{})
if date, ok := b["creation_time"]; ok && date != nil {
- t, err := time.Parse(time.RFC3339, date.(string))
+ t, err := time.Parse(gophercloud.STACK_TIME_FMT, date.(string))
if err != nil {
return nil, err
}
@@ -257,7 +257,7 @@
}
if date, ok := b["updated_time"]; ok && date != nil {
- t, err := time.Parse(time.RFC3339, date.(string))
+ t, err := time.Parse(gophercloud.STACK_TIME_FMT, date.(string))
if err != nil {
return nil, err
}