Git gets the time zone from your system configuration, so if you configured your system correctly, then Git must use the correct time zone. Run date +%z to check your system configuration.
Git may be using the correct time zone, but GitHub will display the time using the wrong time zone. After creating the commit, run git show and check the offset. If this is correct, then the problem is with GitHub.
source share