Added option to use time of day encoder.

Fixes #16.