Add switch to reverse order of tasks_by_time, with test
Merge pull request #2384 from willtrking/master

Add switch to reverse order of tasks_by_time, with test