Late to the party, but at least on git version 2.48.1, the following outputs a valid ISO 8601 timestamp:
git log --pretty=format:'%cI' -n1 --date=iso-strict
On macOS, -d is not a valid option for date, as pointed in another answer.
-d
date