Recently, I forked a repository hosted by github, with contributors spreading all over the world, and found out that the each commit log contains committer's timezone information.
2013-11-07 02:31:41 +0545 <-- This committer is living in Nepal. Surely.
2013-11-04 12:58:36 -0600 <-- This committer is living in CST or Ecuador or Chili or ...
2013-10-31 10:36:36 +0700 <-- This committer is living in Indonesia or Thai or Mongolia or Laos or Australia or ...
:
I know it's possible to hide this by editing the output form (e.g. git: timezone and timestamp format), but this hides what's actually saved in github's repository, only from my eye. Each committer's timezone is surely saved in github's server.
So my questions:
You can use this command to commit in UTC time:
git commit --date="`date --utc +%Y-%m-%dT%H:%M:%S%z`"
You can also alias it to a convenient name:
git config --global alias.commitutc '!git commit --date="$(date --utc +%Y-%m-%dT%H:%M:%S%z)"'
And do git commitutc
.
For a more detailed explanation take a look at this blog post.