Ordering nodes by depature time with non standard time format

Hi, I need to order nodes, which have relationship to Stop node, by departure time(hh:mm:ss) and connect them as row from lowest to highest departure time. The catch is, few of these nodes have departure time above standard 24hr format (24:24:13 for example), so I can't cast them to time property. Is there a way to do it?

with split("24:24:13", ':') as t1
with ("00" + ':'+ t1[1] +':'+ t1[2]) as t2
return t2, time(t2)

Result: "00:24:13", "00:24:13Z"