Fixed the timing for maximum days in the past