function applyTimestamps(schema, obj, options) {
  if (obj == null) {
    return obj;
  }

  applyTimestampsToChildren(schema, obj, options);
  return applyTimestampsToDoc(schema, obj, options);
}
Apply a given schema's timestamps to the given POJO

@param {Schema} schema
@param {Object} obj
@param {Object} [options]
@param {Boolean} [options.isUpdate=false] if true, treat this as an update: just set updatedAt, skip setting createdAt. If false, set both createdAt and updatedAt
@param {Function} [options.currentTime] if set, Mongoose will call this function to get the current time.