public function fromSqlToIso8601Time(string $string, ?DateTimeZone $displayedTimeZone = null): string
    {
        $dateTime = DateTime::createFromFormat(
            "Y-m-d H:i:s",
            $string,
            $displayedTimeZone
        );

        if ($dateTime === false) {
            return "";
        }

        return $dateTime->format(DateTime::ATOM);
    }
public function fromSqlToIso8601Time(string $string, ?DateTimeZone $displayedTimeZone = null): string
    {
        $dateTime = DateTime::createFromFormat(
            "Y-m-d H:i:s",
            $string,
            $displayedTimeZone
        );

        if ($dateTime === false) {
            return "";
        }

        return $dateTime->format(DateTime::ATOM);
    }
public function fromSqlToIso8601Time ( string $ string , ? DateTimeZone $ displayedTimeZone = null ) : string { $ dateTime = DateTime :: createFromFormat ( "Y-m-d H:i:s" , $ string , $ displayedTimeZone ) ; if ( $ dateTime === false ) { return "" ; } return $ dateTime -> format ( DateTime :: ATOM ) ; }
Transforms an SQL compatible date-time string to an ISO 8601 compatible date-time string.
Transforms an SQL compatible date - time string to an ISO 8601 compatible date - time string .