src/Data/DataContainer.php
public function getDateTime($keys, DateTime $default = null)
    {
        $value = $this->getString($keys);
        if (empty($value)) {
            $result = $default;
        } elseif ($value === (string)(int)$value) {
            $result = new DateTime();
            $result->setTimestamp((int)$value);
        } else {
            $result = new DateTime($value);
        }
        return $result;
    }
public function getDateTime($keys, DateTime $default = null)
    {
        $value = $this->getString($keys);
        if (empty($value)) {
            $result = $default;
        } elseif ($value === (string)(int)$value) {
            $result = new DateTime();
            $result->setTimestamp((int)$value);
        } else {
            $result = new DateTime($value);
        }
        return $result;
    }
Returns a DateTime instance from the data container. A string value is interpreted as date string, an integer
value is interpreted as UNIX timestamp.
@param string|string[] $keys
@param DateTime|null $default
@return DateTime|null