Which time zone is GitHub working from on their servers?

For example, a commit made on Sun Dec 2 05:01:00 2012 +0200 is interpreted by GitHub as a commit made on 1st December 2012 in the contributions calendar/graph.

Which is the first hour when a new day starts?


2 Answers 2


GitHub uses a strategy that involves the date-time-offset pattern. When you make a commit, the timestamp includes your offset from UTC.

You can see this in the API docs for the Commits. The sample they show there uses a commit timestamp of "2010-04-10T14:10:01-07:00". This is a valid ISO8601 representation of a date-time-offset. For the person performing the commit, it was April 10th 2010 at 14:10:01. The item would show up on his commit calendar for Saturday, April 10th.

Git and GitHub do not attempt to normalize this data to the offset of the viewer, but they do take it into account when calculating relative time strings. For example, there's a commit on a project I work on that says it was made "1 hour ago". It's 1:30 my time, but when I hover over that text it looks like it was made at 2:30. How can that be? Because my offset is currently -07:00 and the person who made the commit has an offset of -05:00.

So there is no system-wide first hour of the start of a day. Two commits made at the exact same moment in time might appear on two different days even on the same calendar, if they were made by people in different time zones. In other words, a "GitHub day" is a virtual "floating" calendar date that aligns to the committer - not necessarily the viewer.


This is an interesting question, because Github keeps a history of some activities you do each day, plus it has a "longest streak" record.

I narrowed it down. I made a commit at 1am EST, and another at 6am EST. The 1am commit counted against the day before, and the 6am counted as the day of.

This corresponds with the comment on this question, that Also, GitHub servers are in Pacific Time (UTC-8). That seems quite likely.

Edit: Since answering this question, they've made it line up exactly to your local account. I've made commits slightly before and slightly after midnight, and they're credited to the correct dates on my commit graph.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.