So I'm dealing with a Heisenbug ~ A computer bug that disappears or alters its characteristics when an attempt is made to study it.

The scenario:
I have a Windows Service running on a server, hitting a stored procedure say every 10 minutes. This stored procedure pull records from a table containing agent check-ins for events they've been assigned to. This I'm sure couldn't be any easier...if it wasn't for dealing with multiple time zones, but we have to. This has to handle all time zones in north america (for now). That part was hard, but I was able to accomplish it. The way it works is by converting all check in times and times of the event into a 'local time'. The local time would always be the time the server resides in. This all works fine, times take into consideration of DST and everything is accurate. Now here is where the bug becomes noticeable...

I'll run the stored procedure manually, passing say 12:10 PM 1/17/2013 as the check time. This should return all agents that have no existing check ins where there should be (within this time period), and it does! But when I run the same stored procedure again, same parameters, it will return a single agent with no check ins for an event occurring 09:00 AM EST - 11:00AM EST on 1/13/2013, which as you can see is no where near the date passed. So if I run it again a few more times I'll receive the same results, correct ones and then random ones with just a single record with occurrences of days or even weeks before the checking time.

This bug has been haunting me for a months now, and there just seems to be no excuse for what it's doing (not enough consistent results to point a finger in the right direction).

Just ask if there is anything else you'll need to possible help me in my endeavors.