COMPAT: dateutil fixups for 2.3 (GH9021, GH8639)

fixes #9021 
but going to reopen #8639