MoviebaseApp / tmdb-kotlin

🎬 Modern powerful TMDB API to fetch movies and TV shows for Kotlin Multiplatform.
https://www.moviebase.app
Apache License 2.0
205 stars 20 forks source link

Release dates parsed incorrectly #137

Closed MMarco94 closed 5 months ago

MMarco94 commented 5 months ago

All the TmdbReleaseDate obtained by calling movies.getDetails on a Tmdb3, with AppendResponse.RELEASES_DATES, contain a null releaseDate.

I suspect it's because of a bug in LocalDateTimeSerializer: the class tries to parse the String as an instant, which it is, but then ignores the result, see this line.

An example of String being parsed to null is 1993-07-08T00:00:00.000Z: toInstant() works, while toLocalDateTime() errors out with:

java.time.format.DateTimeParseException: Text '1993-07-08T00:00:00.000Z' could not be parsed, unparsed text found at index 23
ChrisKruegerDev commented 5 months ago

Thanks for the report. Do you have an example movie or TV show?

MMarco94 commented 5 months ago

This happened in all movies I've tried, e.g. 526896

ChrisKruegerDev commented 5 months ago

Thanks. I fixed the issue!

MMarco94 commented 5 months ago

Thanks!