bpo-1635741: Enhance _datetime error handling (GH-23139)

1 file changed