DEV Community

Discussion on: What's the longest you've ever spent debugging a single bug?

mattbidewell profile image
Matthew Bidewell

Ha! I have a painful one. Took me nearly a good 3 days to find it. (between tackling other stuff when I hit a wall)

Note: I'm in GMT timezone.

The company I work for has an analytics view which takes a deep dive into the analytics of media the company serve. In November 2019, we got a message from a client saying numbers from our excel download functionality don't match that of their internal systems.

The numbers started off fine, but then massively increase after an arbitrary date. (clue 1)
The client was on the west coast of America, we provide all our analytics in UTC time (clue 2)
The client had multiple occurrences where the analytics was wrong after the arbitrary data. (clue 3).
I didn't have a problem when getting the data. (clue 4).

The problem?
Daylight saving
Without going into specifics.. the problem was going back an hour and then calling .startOfDay() on that date meant we would end up with two days worth of data after daylight savings.

Painful to find...easy to fix.