@cedc7731 - I don't see this behaviour, it all works as expected with identical dates for me?
The only thing I can think of is you have some sort of timezone issue going on with your machine/location that I am not hitting. Perhaps Kovid/chaley may spot this and comment - my code just grabs the date text from the goodreads xml, turns it into the appropriate integers (that can't really go wrong unless goodreads is giving the wrong data back to you) and then does this to turn it into a datetime object:
Code:
from calibre.utils.date import utc_tz
return datetime.datetime(year, month, day, tzinfo=utc_tz)
That result value will then be applied to the database custom column (in the new_value variable) using:
Code:
self.db.set_custom(calibre_id, new_value, label=label, commit=False)