I haven't completely convinced myself of this yet, but I am starting to think that the CBugEventQuery.SetParamDate method ignores the time part of the date passed in.
The following code returns all bugevents up to, but not including the current day. If I manually edit the date in the BugEvent table to "remove the time" (aka set it to midnight), the query then returns the current day.
CBugEventQuery eventQuery = api.BugEvent.NewBugEventQuery();
....
eventQuery.AddWhere("dt<=@LastDate");
eventQuery.SetParamDate("@LastDate", System.DateTime.Now);
...
Can someone confirm that the above query should return any event on or before the current time/date?