protected function convertToDateTime( $time )
    {
        if ( $time instanceof DateTime )
        {
            return clone $time;
        }
        else if ( $time instanceof \DateTime )
        {
            return new DateTime( $time->format( \DateTime::ISO8601 ) );
        }
        else if ( is_numeric( $time ) )
        {
            return new DateTime( '@' . $time );
        }

        return new DateTime( (string) $time );
    }