core/server/models/base/index.js
function fixDates(attrs) {
        var self = this;

        _.each(attrs, function each(value, key) {
            if (value !== null
                && schema.tables[self.tableName].hasOwnProperty(key)
                && schema.tables[self.tableName][key].type === 'dateTime') {
                attrs[key] = moment(value).format('YYYY-MM-DD HH:mm:ss');
            }
        });

        return attrs;
    }
function fixDates(attrs) {
        var self = this;

        _.each(attrs, function each(value, key) {
            if (value !== null
                && schema.tables[self.tableName].hasOwnProperty(key)
                && schema.tables[self.tableName][key].type === 'dateTime') {
                attrs[key] = moment(value).format('YYYY-MM-DD HH:mm:ss');
            }
        });

        return attrs;
    }
function fixDates ( attrs ) { var self = this ; _ . each ( attrs , function each ( value , key ) { if ( value !== null && schema . tables [ self . tableName ] . hasOwnProperty ( key ) && schema . tables [ self . tableName ] [ key ] . type === 'dateTime' ) { attrs [ key ] = moment ( value ) . format ( 'YYYY-MM-DD HH:mm:ss' ) ; } } ) ; return attrs ; }
before we insert dates into the database, we have to normalize
date format is now in each db the same
before we insert dates into the database we have to normalize date format is now in each db the same