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/stackevents/results.go b/openstack/orchestration/v1/stackevents/results.go
index 3c8f1da..cf9e240 100644
--- a/openstack/orchestration/v1/stackevents/results.go
+++ b/openstack/orchestration/v1/stackevents/results.go
@@ -57,7 +57,7 @@
for i, eventRaw := range events {
event := eventRaw.(map[string]interface{})
if date, ok := event["event_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
}
@@ -121,7 +121,7 @@
for i, eventRaw := range events {
event := eventRaw.(map[string]interface{})
if date, ok := event["event_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
}
@@ -161,7 +161,7 @@
event := r.Body.(map[string]interface{})["event"].(map[string]interface{})
if date, ok := event["event_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
}