private static function _dateTime(&$json, $str)
    {
        try {
            return new \DateTime($str);
        } catch (\Exception $ex) {
            throw new UnexpectedResponseException($ex->getMessage(), $json);
        }
    }
private static function _dateTime(&$json, $str)
    {
        try {
            return new \DateTime($str);
        } catch (\Exception $ex) {
            throw new UnexpectedResponseException($ex->getMessage(), $json);
        }
    }
private static function _dateTime ( & $ json , $ str ) { try { return new \ DateTime ( $ str ) ; } catch ( \ Exception $ ex ) { throw new UnexpectedResponseException ( $ ex -> getMessage ( ) , $ json ) ; } }
Deserializes the given string into a `DateTime`.

Assumes the string is in ISO-8601 format.

@param string $json original JSON message
@param string $str  the string holding the date time

@return DateTime a date time

@throws UnexpectedResponseException if given invalid time string
Deserializes the given string into a DateTime .