oknozor / musicbrainz_rs

A wrapper around the musicbrainz API
MIT License
41 stars 18 forks source link

Invalid date format in search_deserializer #38

Closed hypfvieh closed 3 years ago

hypfvieh commented 3 years ago

When trying your example code with the current 'stable' of your library, I always get an error when the created-date is tried to be read:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError(BadFormat)', /home/hypfvieh/.cargo/registry/src/github.com-1ecc6299db9ec823/musicbrainz_rs-0.3.0/src/deserialization/search_deserializer.rs:148:79

When changing the FORMAT from %Y-%m-%dT%H:%M:%S%.f%Z to %Y-%m-%dT%H:%M:%S%.fZ (not the missing % before 'Z') everything is working fine. I'm not sure if this is a proper fix, but the current version is unusable because every query for an artist will fail.

oknozor commented 3 years ago

Hey @hypfvieh, thank you for pointing that out. I think I remember fixing that before, might have been reintroduced during a rebase. Your fix is ok. Since you've done it already do you want to submit a PR or shall I do it ?

hypfvieh commented 3 years ago

I created a pull request.

oknozor commented 3 years ago

fixed in #41