public function setDateFromTimeStamp($timestamp, DateTimeZone $dateTimeZone) {
    $dateTimeZone = !empty($dateTimeZone) ? $dateTimeZone : new DateTimeZone('UTC');
    $this->date = new DateTime('now');
    $this->date->setTimestamp($timestamp);
    $this->date->setTimezone($dateTimeZone);
  }
public function setDateFromTimeStamp($timestamp, DateTimeZone $dateTimeZone) {
    $dateTimeZone = !empty($dateTimeZone) ? $dateTimeZone : new DateTimeZone('UTC');
    $this->date = new DateTime('now');
    $this->date->setTimestamp($timestamp);
    $this->date->setTimezone($dateTimeZone);
  }
public function setDateFromTimeStamp ( $ timestamp , DateTimeZone $ dateTimeZone ) { $ dateTimeZone = ! empty ( $ dateTimeZone ) ? $ dateTimeZone : new DateTimeZone ( 'UTC' ) ; $ this -> date = new DateTime ( 'now' ) ; $ this -> date -> setTimestamp ( $ timestamp ) ; $ this -> date -> setTimezone ( $ dateTimeZone ) ; }
Sets the date from a unix timestamp.

The date should always be UTC.

@param string $timestamp
@param \DateTimeZone $dateTimeZone
Sets the date from a unix timestamp .