MCPcopy Index your code
hub / github.com/pyload/pyload / seconds_to_midnight

Function seconds_to_midnight

module/plugins/internal/misc.py:789–797  ·  view source on GitHub ↗
(utc=None, strict=False)

Source from the content-addressed store, hash-verified

787
788
789def seconds_to_midnight(utc=None, strict=False):
790 if isinstance(utc, int):
791 now = datetime.datetime.utcnow() + datetime.timedelta(hours=utc)
792 else:
793 now = datetime.datetime.today()
794
795 midnight = now.replace(hour=0, minute=0 if strict else 1, second=0, microsecond=0) + datetime.timedelta(days=1)
796
797 return (midnight - now).seconds
798
799
800def search_pattern(pattern, value, flags=0):

Callers 11

parse_timeFunction · 0.85
handle_multiMethod · 0.85
handle_freeMethod · 0.85
check_errorsMethod · 0.85
check_errorsMethod · 0.85
handle_freeMethod · 0.85
check_errorsMethod · 0.85
get_waiting_timeMethod · 0.85
handle_premiumMethod · 0.85
handle_freeMethod · 0.85
handle_freeMethod · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected