webclient/js/Time.js

14 lines
213 B
JavaScript
Raw Normal View History

return {
timestamp: timestamp
};
function timestamp(o, field) {
var field = field || 'date';
var clone = {};
for(var key in o) {
clone[key] = o[key];
}
clone[field] = Date.now();
return clone;
}