from datetime import datetime

t_start: str = "23:00"
t_end: str = "24:00"
t_start_dt: datetime.datetime = datetime.strptime(t_start, "%H:%M")
t_end_dt: datetime.datetime = datetime.strptime(t_end, "%H:%M")
unix_t_start: float = t_start_dt.timestamp()
unix_t_end: float = t_end_dt.timestamp()

x = int(unix_t_end - unix_t_start)

print(x)

t_endが24だと以下のエラーが出ます
24時間表記の時は%Hではないんでしょうか?

ValueError: time data '24:00' does not match format '%H:%M'