Add one more parameter to for the TimeBasedRollingPolicy: "daysOffset". It works together with the rollTime.
By default, daysOffset == 0.
Example: let say, for daily rollover, rollTime is 15:00:00, and today's date is July 21st. Then the rollover will happen at 3pm, and the last log will be renamed using the date July 20th. So basically rollTime indicates that our clock is 15 hours behind.
However, I may need to turn the clock forward. Let say, in the previous example I set daysOffset to 1. Then rollover still happens at 3pm, but the last log will be renamed using July 21st date, and the new current log will correspond to tomorrow's date.
This parameter can also be used for monthly or weekly rollover, to make it happen on the day other than the beginning of month or week.