Reputation: 1741
I read that the --date argument when adding a commit can be used to specify the timestamp and the timezone offset. I'm curious if there's a way to globally set just the timezone offset so it matches my timezone.. I'm in EST which is -0500 from UTC, and whenever I commit and push to Github my contributions never shows up on the correct day. IE. it's 2:00 AM where I am but git sets the timezone offset to UTC. Now when I commit/push my changes to Github they will show up as 9 PM UTC.
I've got a bit of OCD acting up right now.
Upvotes: 11
Views: 13911
Reputation: 426
I've just faced the same issue after moving to another counter. Just clean your cookies, this should help you. It fixed my issue.
Upvotes: 0
Reputation: 54253
Git gets the time zone from your system's configuration, so if you configure your system correctly then Git should use the correct time zone. Run date +%z
to check your system's configuration.
Perhaps Git is using the correct time zone but GitHub is displaying the time using the wrong time zone. After you create a commit, run git show
and check the offset. If it's correct, then the problem is with GitHub.
Upvotes: 1