[Dart] send dates in ISO8601 format#4159
Conversation
|
@ircecho if I understand correctly, this is a breaking change so please submit it against 2.3.0 branch instead. |
|
@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. |
|
@ircecho It's perfectly fine to merge this PR into current master as you've provided very good reasons. |
fix[dart]: send ISO8601 dates
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.