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/stackresources/fixtures.go b/openstack/orchestration/v1/stackresources/fixtures.go
index 0b930f4..c3c3d3f 100644
--- a/openstack/orchestration/v1/stackresources/fixtures.go
+++ b/openstack/orchestration/v1/stackresources/fixtures.go
@@ -53,7 +53,7 @@
],
"logical_resource_id": "hello_world",
"resource_status_reason": "state changed",
- "updated_time": "2015-02-05T21:33:11Z",
+ "updated_time": "2015-02-05T21:33:11",
"required_by": [],
"resource_status": "CREATE_IN_PROGRESS",
"physical_resource_id": "49181cd6-169a-4130-9455-31185bbfc5bf",
@@ -117,7 +117,7 @@
],
"logical_resource_id": "hello_world",
"resource_status_reason": "state changed",
- "updated_time": "2015-02-05T21:33:11Z",
+ "updated_time": "2015-02-05T21:33:11",
"required_by": [],
"resource_status": "CREATE_IN_PROGRESS",
"physical_resource_id": "49181cd6-169a-4130-9455-31185bbfc5bf",
@@ -188,7 +188,7 @@
],
"logical_resource_id": "wordpress_instance",
"resource_status": "CREATE_COMPLETE",
- "updated_time": "2014-12-10T18:34:35Z",
+ "updated_time": "2014-12-10T18:34:35",
"required_by": [],
"resource_status_reason": "state changed",
"physical_resource_id": "00e3a2fe-c65d-403c-9483-4db9930dd194",
diff --git a/openstack/orchestration/v1/stackresources/results.go b/openstack/orchestration/v1/stackresources/results.go
index 69f21da..04a2334 100644
--- a/openstack/orchestration/v1/stackresources/results.go
+++ b/openstack/orchestration/v1/stackresources/results.go
@@ -48,7 +48,7 @@
for i, resourceRaw := range resources {
resource := resourceRaw.(map[string]interface{})
if date, ok := resource["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
}
@@ -109,7 +109,7 @@
for i, resourceRaw := range resources {
resource := resourceRaw.(map[string]interface{})
if date, ok := resource["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
}
@@ -143,7 +143,7 @@
resource := r.Body.(map[string]interface{})["resource"].(map[string]interface{})
if date, ok := resource["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
}