This assumes that you will only ever pass strings to last_commit_date. It can be annoying in some situations (debugging/console/whatever).
You should call to_datetime in the place where you know you have a string.