v0.8.11
Note that the dates stored for Shock nodes have recently been changed from being stored as strings to golang Time objects, documented here:
http://golang.org/pkg/time/#Time
If you have created nodes in your Shock server using an older version of Shock, the application will still function properly but the last_modified and created_on fields will not display properly for your previously created nodes. To resolve this issue, you can update these node fields in your mongo database using the following code:
mongo
use ShockDB
var cursor = db.Nodes.find()
while (cursor.hasNext()) { var doc = cursor.next(); db.Nodes.update({_id: doc._id}, {$set: {last_modified : new Date(doc.last_modified)}}) }
var cursor = db.Nodes.find()
while (cursor.hasNext()) { var doc = cursor.next(); db.Nodes.update({_id: doc._id}, {$set: {created_on : new Date(doc.created_on)}}) }
var cursor = db.Nodes.find({"last_modified": {"$lte": new ISODate("0000-00-00T00:00:00Z")}})
while (cursor.hasNext()) { var doc = cursor.next(); db.Nodes.update({_id: doc._id}, {$set: {last_modified : new ISODate("0000-00-00T00:00:00Z")}}) }
After performing these operations the last_modified and created_on fields should display properly for your old nodes when you query your Shock server. Note, these operations are not required for nodes generated after updating your version of Shock.