Neos\Neos\Ui\Domain\Service\NodePropertyConversionService::convertDateTime PHP Method

convertDateTime() protected method

Convert raw value to \DateTime
protected convertDateTime ( string $rawValue ) : DateTime | null
$rawValue string
return DateTime | null
    protected function convertDateTime($rawValue)
    {
        if ($rawValue !== '') {
            $result = \DateTime::createFromFormat(\DateTime::W3C, $rawValue);
            $result->setTimezone(new \DateTimeZone(date_default_timezone_get()));
            return $result;
        }
    }