Fix for handling of 310 LocalDateTime - also needs applying to 310 backport (originally reported by gkopff)