Fixes Midnight Rollover Protection

* Fixed the non-existent Midnight Rollover Protection.
* Moved Midnight Rollover Protection to "timeleft()".
* Removed "direction == 2" check, because "direction" is never 2.
10 times less seconds in a day

MIDNIGHT_ROLLOVER is number of deciseconds in a day.
Added a missing "/10".
Merge pull request #3566 from Deantwo/master

Fixes Midnight Rollover Protection