[git] IDEA-125328 Don't crash if commit/author time is empty

Due to some reports, it happens sometimes in some Git repositories
for unknown reasons.

Don't throw an exception, just log it and return 0 in these cases.

(cherry picked from commit a981a80867d8c3e3b4e68332fc05df0ae1328d09)