Skip to content

Conversation

@ircecho
Copy link
Contributor

@ircecho ircecho commented Nov 8, 2016

Dates for parameters were sent by using DateTime#toString. This would give us a date of the format "2016-11-08 14:33:37.270". Now I changed it to use DateTime#toIso8601String to give us a value like "2016-11-08T14:34:29.520". There were functions to format the date correctly, but those were not used anymore, which is why I assume that ISO8601 should have been used in the first place.

In other news, I decided not to use the provided code which relied on the intl package to format a ISO 8601, but a function from the DateTime class in core, thereby eliminating the necessity for using the external "intl" library.

@wing328
Copy link
Contributor

wing328 commented Nov 9, 2016

@ircecho if I understand correctly, this is a breaking change so please submit it against 2.3.0 branch instead.

@ircecho
Copy link
Contributor Author

ircecho commented Nov 9, 2016

@wing328 I would see this as a bugfix. The code was adapted to work as originally intended. The intention can be seen by the inclusion of the intl library by the original author and the provision of the format function to format dates for iso8061, which was no longer in use, due to some change in the past. Additionally, our backend accepts iso8061 dates only, and it has been working with the dart client library at least last year, and although i could not find any particular change that changed the date format (I did not search very long), I assume that some commit within the last year changed the library to erroneously use non standard date formats, which is why it would be okey to change it back.

If you still insist, that the changes be merged into the 2.3.0 branch instead, I will of course change the pull request.

@wing328
Copy link
Contributor

wing328 commented Nov 9, 2016

@ircecho It's perfectly fine to merge this PR into current master as you've provided very good reasons.

@wing328 wing328 merged commit 5899554 into swagger-api:master Nov 9, 2016
@wing328 wing328 changed the title fix[dart]: send ISO8601 dates [Dart]: send dates in ISO8601 format Feb 20, 2017
@wing328 wing328 changed the title [Dart]: send dates in ISO8601 format [Dart] send dates in ISO8601 format Feb 20, 2017
davidgri pushed a commit to davidgri/swagger-codegen that referenced this pull request May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants