Skip to content

Conversation

friism
Copy link
Contributor

@friism friism commented Jul 19, 2012

RestSharp currently fails to parse DateTime formatted by Newtonsoft.Json.Converters.IsoDateTimeConverter. DateTime.Parse() does a pretty good job on these so I've added that as a last-ditch attempt. Alternatively, it should be attempted in JsonDeserializer.Map if no DateFormat is specified.

@johnsheehan
Copy link
Contributor

+1 looks good to me

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason these assertions use string comparison instead of comparing the DateTimes directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what all the other ones do and I wanted to do it the same way. Other than that, there's no reason. Should I compare directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed all comparisons to be more sane and removed some other whitespace stuff.

@pedrolamas
Copy link
Contributor

I was just about to merge this change, but think something got broke regarding the tests, because GitHub now states "pull request cannot be automatically merged"; can you merge the current code version on the repository with your code and update the pull request?

@friism
Copy link
Contributor Author

friism commented Jul 23, 2012

@pedrolamas That "something" was you changing the line-endings in the misc.cs file in this commit: pedrolamas@77befa1

That change seems unrelated to what was otherwise happening, it should have been in a separate branch, why did you add it?

At any rate, I've rebased this branch.

@pedrolamas
Copy link
Contributor

I didn't change it knowingly, my Visual Studio must have done it for me and it slipped "under the radar" when I pushed the changes... :\

Sorry for the extra-work and thank you for the help!

pedrolamas added a commit that referenced this pull request Jul 23, 2012
…01-dates

Improve support for parsing iso8601 dates
@pedrolamas pedrolamas merged commit 1a28f1f into restsharp:master Jul 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants