<?php

class CRM_Speakcivi_Logic_Consent {
  public $publicId;
  public $version;
  public $language;
  public $date;
  public $createDate;
  public $level;
  public $method;
  public $methodOption;

  /**
   * @param $param
   *
   * @return array
   */
  public static function prepareFields($param) {
    $consents = [];
    if (property_exists($param, 'consents')) {
      foreach ($param->consents as $consent) {
        list($consentVersion, $consentLanguage) = explode('-', $consent->public_id);
        $cd = new DateTime(substr($param->create_dt, 0, 10));
        $c = new self();
        $c->publicId = $consent->public_id;
        $c->version = $consentVersion;
        $c->language = $consentLanguage;
        $c->date = $cd->format('Y-m-d');
        $c->createDate = $cd->format('Y-m-d H:i:s');
        $c->level = $consent->consent_level;
        $c->method = $consent->consent_method;
        $c->methodOption = $consent->consent_method_option;
        $consents[] = $c;
      }
    }
    return $consents;
  }

}

<?php

class CRM_Speakcivi_Logic_Consent {
  public $publicId;
  public $version;
  public $language;
  public $date;
  public $createDate;
  public $level;
  public $method;
  public $methodOption;

  /**
   * @param $param
   *
   * @return array
   */
  public static function prepareFields($param) {
    $consents = [];
    if (property_exists($param, 'consents')) {
      foreach ($param->consents as $consent) {
        list($consentVersion, $consentLanguage) = explode('-', $consent->public_id);
        $cd = new DateTime(substr($param->create_dt, 0, 10));
        $c = new self();
        $c->publicId = $consent->public_id;
        $c->version = $consentVersion;
        $c->language = $consentLanguage;
        $c->date = $cd->format('Y-m-d');
        $c->createDate = $param->create_dt;
        $c->level = $consent->consent_level;
        $c->method = $consent->consent_method;
        $c->methodOption = $consent->consent_method_option;
        $consents[] = $c;
      }
    }
    return $consents;
  }

}

Fix date of DPA activity properly
Fix date of DPA activity properly
