You are here

public function Request::getTime in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/jcalderonzumba/gastonjs/src/NetworkTraffic/Request.php \Zumba\GastonJS\NetworkTraffic\Request::getTime()

Returns if exists the request time

Return value

\DateTime

File

vendor/jcalderonzumba/gastonjs/src/NetworkTraffic/Request.php, line 85

Class

Request
Class Request @package Zumba\GastonJS\NetworkTraffic

Namespace

Zumba\GastonJS\NetworkTraffic

Code

public function getTime() {
  if (isset($this->data['time'])) {
    $requestTime = new \DateTime();

    //TODO: fix the microseconds to miliseconds
    $requestTime
      ->createFromFormat("Y-m-dTH:i:s.uZ", $this->data["time"]);
    return $requestTime;
  }
  return null;
}