diff --git a/openstack/db/v1/configurations/fixtures.go b/openstack/db/v1/configurations/fixtures.go
index 95784ad..ae65416 100644
--- a/openstack/db/v1/configurations/fixtures.go
+++ b/openstack/db/v1/configurations/fixtures.go
@@ -1,23 +1,31 @@
 package configurations
 
-import "fmt"
+import (
+	"fmt"
+	"time"
+)
 
-const singleConfigJSON = `
+var (
+	timestamp  = "2015-11-12T14:22:42Z"
+	timeVal, _ = time.Parse(time.RFC3339, timestamp)
+)
+
+var singleConfigJSON = `
 {
-  "created": "2014-07-31T18:56:09",
+  "created": "` + timestamp + `",
   "datastore_name": "mysql",
   "datastore_version_id": "b00000b0-00b0-0b00-00b0-000b000000bb",
   "datastore_version_name": "5.6",
   "description": "example_description",
   "id": "005a8bb7-a8df-40ee-b0b7-fc144641abc2",
   "name": "example-configuration-name",
-  "updated": "2014-07-31T18:56:09"
+  "updated": "` + timestamp + `"
 }
 `
 
-const singleConfigWithValuesJSON = `
+var singleConfigWithValuesJSON = `
 {
-  "created": "2014-07-31T15:02:52",
+  "created": "` + timestamp + `",
   "datastore_name": "mysql",
   "datastore_version_id": "b00000b0-00b0-0b00-00b0-000b000000bb",
   "datastore_version_name": "5.6",
@@ -25,7 +33,7 @@
   "id": "005a8bb7-a8df-40ee-b0b7-fc144641abc2",
   "instance_count": 0,
   "name": "example-configuration-name",
-  "updated": "2014-07-31T15:02:52",
+  "updated": "` + timestamp + `",
   "values": {
     "collation_server": "latin1_swedish_ci",
     "connect_timeout": 120
@@ -123,25 +131,25 @@
 `
 
 var ExampleConfig = Config{
-	Created:              "2014-07-31T18:56:09",
+	Created:              timeVal,
 	DatastoreName:        "mysql",
 	DatastoreVersionID:   "b00000b0-00b0-0b00-00b0-000b000000bb",
 	DatastoreVersionName: "5.6",
 	Description:          "example_description",
 	ID:                   "005a8bb7-a8df-40ee-b0b7-fc144641abc2",
 	Name:                 "example-configuration-name",
-	Updated:              "2014-07-31T18:56:09",
+	Updated:              timeVal,
 }
 
 var ExampleConfigWithValues = Config{
-	Created:              "2014-07-31T15:02:52",
+	Created:              timeVal,
 	DatastoreName:        "mysql",
 	DatastoreVersionID:   "b00000b0-00b0-0b00-00b0-000b000000bb",
 	DatastoreVersionName: "5.6",
 	Description:          "example description",
 	ID:                   "005a8bb7-a8df-40ee-b0b7-fc144641abc2",
 	Name:                 "example-configuration-name",
-	Updated:              "2014-07-31T15:02:52",
+	Updated:              timeVal,
 	Values: map[string]interface{}{
 		"collation_server": "latin1_swedish_ci",
 		"connect_timeout":  120,
diff --git a/openstack/db/v1/configurations/results.go b/openstack/db/v1/configurations/results.go
index 98ce25f..37a77ad 100644
--- a/openstack/db/v1/configurations/results.go
+++ b/openstack/db/v1/configurations/results.go
@@ -1,6 +1,8 @@
 package configurations
 
 import (
+	"time"
+
 	"github.com/mitchellh/mapstructure"
 	"github.com/rackspace/gophercloud"
 	"github.com/rackspace/gophercloud/pagination"
@@ -8,11 +10,11 @@
 
 // Config represents a configuration group API resource.
 type Config struct {
-	Created              string
-	Updated              string
-	DatastoreName        string `mapstructure:"datastore_name"`
-	DatastoreVersionID   string `mapstructure:"datastore_version_id"`
-	DatastoreVersionName string `mapstructure:"datastore_version_name"`
+	Created              time.Time `mapstructure:"-"`
+	Updated              time.Time `mapstructure:"-"`
+	DatastoreName        string    `mapstructure:"datastore_name"`
+	DatastoreVersionID   string    `mapstructure:"datastore_version_id"`
+	DatastoreVersionName string    `mapstructure:"datastore_version_name"`
 	Description          string
 	ID                   string
 	Name                 string
@@ -42,6 +44,33 @@
 	}
 
 	err := mapstructure.Decode(casted, &resp)
+
+	var vals []interface{}
+	switch (casted).(type) {
+	case interface{}:
+		vals = casted.(map[string]interface{})["configurations"].([]interface{})
+	}
+
+	for i, v := range vals {
+		val := v.(map[string]interface{})
+
+		if t, ok := val["created"].(string); ok && t != "" {
+			creationTime, err := time.Parse(time.RFC3339, t)
+			if err != nil {
+				return resp.Configs, err
+			}
+			resp.Configs[i].Created = creationTime
+		}
+
+		if t, ok := val["updated"].(string); ok && t != "" {
+			updatedTime, err := time.Parse(time.RFC3339, t)
+			if err != nil {
+				return resp.Configs, err
+			}
+			resp.Configs[i].Updated = updatedTime
+		}
+	}
+
 	return resp.Configs, err
 }
 
@@ -60,6 +89,24 @@
 	}
 
 	err := mapstructure.Decode(r.Body, &response)
+	val := r.Body.(map[string]interface{})["configuration"].(map[string]interface{})
+
+	if t, ok := val["created"].(string); ok && t != "" {
+		creationTime, err := time.Parse(time.RFC3339, t)
+		if err != nil {
+			return &response.Config, err
+		}
+		response.Config.Created = creationTime
+	}
+
+	if t, ok := val["updated"].(string); ok && t != "" {
+		updatedTime, err := time.Parse(time.RFC3339, t)
+		if err != nil {
+			return &response.Config, err
+		}
+		response.Config.Updated = updatedTime
+	}
+
 	return &response.Config, err
 }
 
diff --git a/openstack/db/v1/instances/fixtures.go b/openstack/db/v1/instances/fixtures.go
index 1388e23..af7b185 100644
--- a/openstack/db/v1/instances/fixtures.go
+++ b/openstack/db/v1/instances/fixtures.go
@@ -3,6 +3,7 @@
 import (
 	"fmt"
 	"testing"
+	"time"
 
 	"github.com/rackspace/gophercloud"
 	"github.com/rackspace/gophercloud/openstack/db/v1/datastores"
@@ -10,9 +11,14 @@
 	"github.com/rackspace/gophercloud/testhelper/fixture"
 )
 
-const instance = `
+var (
+	timestamp  = "2015-11-12T14:22:42Z"
+	timeVal, _ = time.Parse(time.RFC3339, timestamp)
+)
+
+var instance = `
 {
-  "created": "2014-02-13T21:47:13",
+  "created": "` + timestamp + `",
   "datastore": {
     "type": "mysql",
     "version": "5.6"
@@ -40,7 +46,7 @@
   "id": "{instanceID}",
   "name": "json_rack_instance",
   "status": "BUILD",
-  "updated": "2014-02-13T21:47:13",
+  "updated": "` + timestamp + `",
   "volume": {
     "size": 2
   }
@@ -103,8 +109,8 @@
 )
 
 var expectedInstance = Instance{
-	Created: "2014-02-13T21:47:13",
-	Updated: "2014-02-13T21:47:13",
+	Created: timeVal,
+	Updated: timeVal,
 	Flavor: flavors.Flavor{
 		ID: "1",
 		Links: []gophercloud.Link{
diff --git a/openstack/db/v1/instances/results.go b/openstack/db/v1/instances/results.go
index 61dc021..9a49510 100644
--- a/openstack/db/v1/instances/results.go
+++ b/openstack/db/v1/instances/results.go
@@ -1,6 +1,8 @@
 package instances
 
 import (
+	"time"
+
 	"github.com/mitchellh/mapstructure"
 	"github.com/rackspace/gophercloud"
 	"github.com/rackspace/gophercloud/openstack/db/v1/datastores"
@@ -20,10 +22,10 @@
 // Instance represents a remote MySQL instance.
 type Instance struct {
 	// Indicates the datetime that the instance was created
-	Created string //time.Time
+	Created time.Time `mapstructure:"-"`
 
 	// Indicates the most recent datetime that the instance was updated.
-	Updated string //time.Time
+	Updated time.Time `mapstructure:"-"`
 
 	// Indicates the hardware flavor the instance uses.
 	Flavor flavors.Flavor
@@ -85,6 +87,23 @@
 	}
 
 	err := mapstructure.Decode(r.Body, &response)
+	val := r.Body.(map[string]interface{})["instance"].(map[string]interface{})
+
+	if t, ok := val["created"].(string); ok && t != "" {
+		creationTime, err := time.Parse(time.RFC3339, t)
+		if err != nil {
+			return &response.Instance, err
+		}
+		response.Instance.Created = creationTime
+	}
+
+	if t, ok := val["updated"].(string); ok && t != "" {
+		updatedTime, err := time.Parse(time.RFC3339, t)
+		if err != nil {
+			return &response.Instance, err
+		}
+		response.Instance.Updated = updatedTime
+	}
 
 	return &response.Instance, err
 }
@@ -129,6 +148,32 @@
 
 	err := mapstructure.Decode(casted, &response)
 
+	var vals []interface{}
+	switch (casted).(type) {
+	case interface{}:
+		vals = casted.(map[string]interface{})["instances"].([]interface{})
+	}
+
+	for i, v := range vals {
+		val := v.(map[string]interface{})
+
+		if t, ok := val["created"].(string); ok && t != "" {
+			creationTime, err := time.Parse(time.RFC3339, t)
+			if err != nil {
+				return response.Instances, err
+			}
+			response.Instances[i].Created = creationTime
+		}
+
+		if t, ok := val["updated"].(string); ok && t != "" {
+			updatedTime, err := time.Parse(time.RFC3339, t)
+			if err != nil {
+				return response.Instances, err
+			}
+			response.Instances[i].Updated = updatedTime
+		}
+	}
+
 	return response.Instances, err
 }
 
