INNER CODE UNIT · Python
utc_offset_minutes
cwuom/NeriPlayer · tools_pub/ytmusic_api_probe.py:465
def utc_offset_minutes() -> int:
return -time.timezone // 60
def current_timezone_name() -> str:
if time.daylight and time.localtime().tm_isdst:
return time.tzname[1] or "UTC"
return time.tzname[0] or "UTC"
def find_optional(text: str, *patterns: str) -> str:
for pattern in patterns:
match = re.search(pattern, text)
if match:
return match.group(1)
return ""