Words.find({},function(err,words){
if(err){
callback(err);
}else{
for(var index in words){
words[index].create_time=tools.formatDate(words[index].create_time,true);
console.log(words[index].create_time);
console.log(tools.formatDate(words[index].create_time,true))
}
callback(null,words);
}
});
上面打印结果是 Tue Dec 16 2014 15:08:00 GMT+0800 (CST) 25分钟前 Tue Dec 16 2014 15:08:53 GMT+0800 (CST) 24分钟前
我想问为什么理应被格式化了的words[index].create_time仍然是以前的样子