It happens that someone already developed such a custom node.
In fact, it is a set of nodes. The one you may have a look is the time inject of course. I have not tested.