Git Daylight Savings Time Bug

Last update: Sunday, March 31, 23:03 CET

TL;DR:

Follow the official instructions at https://git-scm.com/docs/dst-bug on how to fix it until the new version is delivered.

Summary

On Sunday, March 31, in most timezones the Daylight Saving Time (DST) started. Since then, we discovered that most Git implementations have a latent bug where the daylight saving time was not always taken into account when logging the CommitDate. This leads to very confusing commit logs.

The bug was first introduced in version 2.31.0 and still occurs in at least version 2.44.0. It is present on all major platforms (Windows, Linux, Mac).

The Git maintainers are working on a proper fix. In the meantime, they've discovered and documented several workarounds, depending on your exact platform and version.

Example

Balandžio Pirmoji was working with Huhtikuun Ensimmäinen when they discovered that Balandžio seemed to have fixed a typo in the README.md 57 minutes before it was introduced by Huhtikuun.

Background

The bug was introduced in version 2.31.0 (changelog), during the SHA1 to SHA256 rewrite, just over three years ago. But it only triggered now because this is the first Daylight Saving Time transition in a Leap Year. As a result, all Git executables that have been released since March 15, 2021 contain this problem.

Status

Please check the official documentation at https://git-scm.com/docs/dst-bug to see how you can make sure you are not affected. They will keep you posted on when the patched version will be available.