You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current API calls excludes milliseconds while using the ModifiedAfter option. This is important as the Xero APIs return milliseconds in their UpdatedDateUTC fields (at least they do in the invoices APIs) e.g. "2019-03-01T09:00:31.597". The net result, is I can't hand back the most recent UpdatedDateUTC to get_invoices and expect the current item I'm looking at to have been excluded from the response.
As I understand it, most HTTP servers assume this header is a string and not at exact representation of time (the server compares the strings rather than parsing dates and comparing dates).
Having dug in more, I noticed that the Xero API itself expects a specific date format that doesn't allow milliseconds (which is kind of unfortunate) ... I've decided to add a little bit of code to always round to the next second in my own project
While this isn't a bug I guess, it is something probably worth documenting in the wiki for xero-gateway as this doesn't match how most other APIs/ servers treat If-Modified-Since
The text was updated successfully, but these errors were encountered:
The current API calls excludes milliseconds while using the
ModifiedAfter
option. This is important as the Xero APIs return milliseconds in theirUpdatedDateUTC
fields (at least they do in the invoices APIs) e.g. "2019-03-01T09:00:31.597". The net result, is I can't hand back the most recentUpdatedDateUTC
toget_invoices
and expect the current item I'm looking at to have been excluded from the response.As I understand it, most HTTP servers assume this header is a string and not at exact representation of time (the server compares the strings rather than parsing dates and comparing dates).
Code in question is
xero_gateway/lib/xero_gateway/http.rb
Line 31 in 8603f2e
....
Having dug in more, I noticed that the Xero API itself expects a specific date format that doesn't allow milliseconds (which is kind of unfortunate) ... I've decided to add a little bit of code to always round to the next second in my own project
While this isn't a bug I guess, it is something probably worth documenting in the wiki for xero-gateway as this doesn't match how most other APIs/ servers treat
If-Modified-Since
The text was updated successfully, but these errors were encountered: