protected function convertDateTime($rawValue)
    {
        if ($rawValue !== '') {
            $result = \DateTime::createFromFormat(\DateTime::W3C, $rawValue);
            $result->setTimezone(new \DateTimeZone(date_default_timezone_get()));

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

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

@param string $rawValue
@return \DateTime|null
Convert raw value to \ DateTime