How to reformat time

Hi I need to format the time when the bot is running, for example, if I running bot at 13:15 I need to enter time range as 12:00:00 to 12:59:59, so whenever I’m running the bot the time should be ( -1):59:59 and ():00:00
thanks!!