You have multiple separate problems here, not all of which I think you can solve using the Git front end commands alone.
First, each commit has two date/time stamps. There is an author date field and a committer date field. To see both, use git log --format=fuller
for instance:
commit 5571d085b3c9c2aa9470a10bcf2b8518d3e4ec99
Merge: bedb914551 5cf8e06474
Author: Junio C Hamano <gitster pobox.com>
AuthorDate: Wed Jul 18 12:20:35 2018 -0700
Commit: Junio C Hamano <gitster pobox.com>
CommitDate: Wed Jul 18 12:20:35 2018 -0700
While the two are often exactly the same (as in this case), sometimes they are not:
commit 88a8ecaeaa87a84100c4eb49fb9af7a77977cc1b
Author: Stefan Beller <sbeller google.com>
AuthorDate: Thu Jun 28 19:10:48 2018 -0700
Commit: Junio C Hamano <gitster pobox.com>
CommitDate: Fri Jun 29 09:29:44 2018 -0700
The --since
and --until
operations work on the committer date but the default is to show the author date. See my answer to How to get git to show commits in a specified date range for author date? See also Tim Beigeleisen's answer, which shows how to use formatting directives to extract the particular date in a particular format suitable for use in awk or similar.
The remaining problem is the one you have identified: that time zone information is tricky. Here, see git: timezone and timestamp format and note that the formatting directives %ai
and %ci
do not obey --date=
but %ad
and %cd
do. The --date=
directives have expanded over time, so that as of Git 2.14, you can use --date=local
, --date=format-local:...
, and so on (and there are tests to make sure it all works). See commit 6eced3ec5e5d7fbe61de2791e2627b1acf1246b3 in particular.