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

DateTimeParseException on dates without timezones #30

Closed
chaneylc opened this issue Mar 15, 2021 · 0 comments
Closed

DateTimeParseException on dates without timezones #30

chaneylc opened this issue Mar 15, 2021 · 0 comments

Comments

@chaneylc
Copy link
Contributor

If brapi servers have incorrectly formatted dates s.a: 2000-04-11 it leads to an exception:

java.time.format.DateTimeParseException: Text '2000-04-11' could not be parsed at index 10

It looks like this has to do with the Gson builder in the JSON class:
https://github.com/Breeding-Insight/brapi/blob/64a0760ae7b62638bb70a942bb2d322374ec323d/brapi-java-client/src/main/java/org/brapi/client/v2/JSON.java

There's an interesting note about Date parsing in the GSON documentation:
https://www.javadoc.io/doc/com.google.code.gson/gson/2.8.0/com/google/gson/GsonBuilder.html

nickpalladino added a commit that referenced this issue Oct 28, 2021
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

No branches or pull requests

1 participant