如何格式化sails.js模型的date时间

我努力了:

user.lastSeen = new Date().toISOString() user.lastSeen = new Date() user.lastSeen = new Date().now(); 

都触发了一个

 { "ValidationError": { "lastSeen": [ { "data": "2014-01-05T10:25:06.184Z", "message": "Validation error: \"2014-01-05T10:25:06.184Z\" is not of type \"datatime\"", "rule": "datatime" } ] } } 

       

网上收集的解决方案 "如何格式化sails.js模型的date时间"