diff --git a/lib/waterline-schema/attributes.js b/lib/waterline-schema/attributes.js index 0e0e2d6..9d62f0e 100644 --- a/lib/waterline-schema/attributes.js +++ b/lib/waterline-schema/attributes.js @@ -213,7 +213,9 @@ Attributes.prototype.autoAttributes = function(collection, connections) { // Extend definition with autoUpdatedAt and autoCreatedAt timestamps var now = { type: 'datetime', - 'default': 'NOW' + defaultsTo: function () { + return new Date(); + } }; if(collection.autoCreatedAt && !attributes[collection.autoCreatedAt]) {