I'm writing up some Selenium tests for my site, and I'd like to test the date/timepickers I have, primarily to make sure that the code I put in to prevent users from putting in dates out of order works. 
However, I've realized that the tests I have won't work the way I want them to if it's close to midnight, as the times I'm passing in will wrap to the next day, and be earlier than the current time rather than later, or vice versa.
Is it possible to run these tests as if it were a specific date/time?
If you want to keep the date/time constant for the purpose of your tests, you can just hardcode the date/time and passing it to the methods you want to test. If "hardcoding a date" doesn't feel right you could hardcode the specific sequence of actions that a browser might go through, to pick a particular date that happens to be static.
After all, you are testing whether your method correctly determines whether a date is before or after another date; how the input is provided is not relevant.
Selenium tests using static date