Move RFC3339Milli to the root package.
diff --git a/openstack/identity/v3/tokens/results.go b/openstack/identity/v3/tokens/results.go
index 8e0f018..145a43d 100644
--- a/openstack/identity/v3/tokens/results.go
+++ b/openstack/identity/v3/tokens/results.go
@@ -4,11 +4,9 @@
"time"
"github.com/mitchellh/mapstructure"
+ "github.com/rackspace/gophercloud"
)
-// RFC3339Milli describes the time format used by identity API responses.
-const RFC3339Milli = "2006-01-02T15:04:05.999999Z"
-
// TokenCreateResult contains the document structure returned from a Create call.
type TokenCreateResult struct {
response map[string]interface{}
@@ -37,7 +35,7 @@
}
// Attempt to parse the timestamp.
- ts, err := time.Parse(RFC3339Milli, resp.Token.ExpiresAt)
+ ts, err := time.Parse(gophercloud.RFC3339Milli, resp.Token.ExpiresAt)
if err != nil {
return time.Time{}, err
}