Make time of day compatible with MongoDB

This should probably actually be in a rails-tod gem (cf. rails-money).
As it is, in order to test I would have to have a dummy rails app in the,
library, which doesn't seem right ...