rgw/lc: adjust timing if the configured end work-time is less than the start-time
LC work time is given in the form of "HH:MM-HH:MM"; the first part
represents the "start_time" and the next "end_time". "should_work"
function decides, given the current time, whether the LC worker can resume.
It essentially checks whether the current time is within start and end times.
Since there's no "date" (month/day/year) notion taken into account, a work time
whose end_time (i.e., hour field) is less than start_time is not properly
handled by "should_work". For example, "14:00-13:59" would normally mean to
start LC processing at 2PM local time and allowing it to run for 24 hours. So,
given such a work time range, "should_work" must return true for any given
current_time. However, without this adjustment, it always returns false.
The fix simply adds a "next day" adjustment if the end_time is
configured to be less than the configured start_time.
Fixes https://tracker.ceph.com/issues/63613
Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
(cherry picked from commit
48e189fe0ec6c0ace23ddaed09ef3f936e8c2a6f)