Added configuration option to set the length of the day.