In my project I have a controller that makes a query out to the server as soon as it loads. It has to get all of the transactions for a customer from the beginning of the month at midnight until the current date/time, and both the starting date/time and the ending date/time are passed in the querystring. In the project this works without a hitch, but when I try to write unit tests and account for the constantly varying date/time I am running into problems. It seems that no matter what date I try to inject into the querystring, the starting date always ends up a month behind and at 5pm instead of midnight. This happens even when I add one to the month to account for JavaScript returning the month as one less than it actually is. Oddly enough, the ending date always seems to come out right, but the time is off by about some amount that I haven't figured out yet. Needless to say, I'm wondering where things are going wrong.
I did some searching of the group archives and found a few things that were at least partially applicable, but nothing that I have had luck in getting to work. Any advice that anyone could give would be much appreciated.