Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle case where weird date timestamps are sent from Xero #154

Merged
merged 1 commit into from
Oct 15, 2016

Conversation

MattHealy
Copy link
Contributor

I had a user that was getting this sort of Date object being returned from Xero:

"DateOfBirth": "\/Date(0+0000)\/",

This was breaking pyxero's JSON date parsing. This commit handles the case where no values could be obtained from the Date parsing. I wasn't sure of proceeding this way, or perhaps just handling the case where the timestamp is 0, but this way should stop exceptions being raised if a date or datetime object can not be created.

@aidanlister aidanlister merged commit a8b6eae into freakboy3742:master Oct 15, 2016
@MattHealy MattHealy deleted the datefix branch October 15, 2016 07:21
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.

2 participants