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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With