joyent/node — pull request #3710 by austinbv (2012-07-14 06:29:11+00:00)
Title: Timers explode when date has been stubbed

Timers in node all throw an exception when date has been stubbed, mocked, or modified and does not respond like a Date.

To allow for testing and to make times more self-relient the timers module now holds it's own copy of Date rather that referring to the global all over.

*Use cases*
* Libraries like Timecop.js can be turned into a full npm modules
* tests can have timeouts that do not freeze when time is modified