Closed
Description
This happens when committing via call to repo.index.commit(message). The timezone value is off by 20 minutes. When I issue 'git log', the following shows:
commit 8767403c5e175b5bf69b4ba1d23e8462c722867e Author: Amol Date: Sat May 20 18:50:10 2017 +0530 'Solved.' commit 88a0953df5dc4036633e9f5a295291084b144064 Author: Amol Date: Sat May 20 17:28:13 2017 +0550 Solved. commit 3a0daff1a2655469d412cfd4ab61b00b8da3f63d Author: Amol Date: Sat May 20 14:42:33 2017 +0530 Updated readme.
From the bottom, here's how the commits were made:
- via 'git commit' on command line
- via call to repo.index.commit
- via 'git commit' on command line, again, to make sure it wasn't a problem with git configuration
As you can see, when committed through GitPython, value for timezone is off by 20 minutes. It is an issue with code related to the commit operation. To verify, I added files to the repo using repo.index.add and then committed via 'git commit' on the command line, the timezone was right in this case.
I checked timezone reported by:
- system ('date +%z'), +0530
- python (time.timezone), -19800
Both show the correct timezone, +0530, i.e., India Standard Time.