One of the sneakiest, hardest to explain bugs. The process works fine any day you test it, but occasionally - and only occasionally it's just... wrong. Test it again and it's fine, no matter what day you test it.

This particular issue stems from a habit of grabbing a datetime whenever you need it, but coding as if you were getting the same value each time. It's an easy to explain issue, but there's not a term for it (as far as I can tell), so, I coined one: Date Shear.

What is Date Shear?

Date Shear (noun): Insidiously difficult to reproduce bugs that occur due to code fetching the "current time" multiple times, while the logic expects the same value. The result can be catastrophically incorrect behavior if the code is executed across a day, month or year boundary.

A Common Example