Revision 5167a92f-1c5d-4c55-9669-db0a8a805ebf - Code Golf Stack Exchange

# [Wolfram Language (Mathematica)], 180 bytes

 (p=#;Min@(s=Select)[(f[{f@#[[;;2]],f@#[[-2;;]]},m=MixedRadix[{24,60}]]-f[{v,f@p[[-2;;]]},m])&/@s[Permutations@p,24>(f=FromDigits)@#[[;;2]]>=(v=f@p[[;;2]])&&f@#[[-2;;]]<60&],#>0&])&

[Try it online!][TIO-ldydot0w]

[Wolfram Language (Mathematica)]: https://www.wolfram.com/wolframscript/
[TIO-ldydot0w]: https://tio.run/##TY3BasMwEER/pWAQEmywLYu0oMjoUHoLhPYodDCJ7Aoix9hqCAh/u7qYUnLY5e0wOxO6@O1CF/25y4PKdFKFPPpR00V9uas7R2Zob1KvC2Ok5NbChjsupbUrBHX0D3f57C7@YRIXsK9Wa3f4cUfj9GS0jJR6MSc3h5@Ifbdx0RNw0dJefcy38O4HHxf239MqeldbxHYyQp6KD/uKWCha3Izk0@zH@FLqodQp1VCDgGaFVCHhINXwCg28bSSA/2kNUoXEkQRqa86/ "Wolfram Language (Mathematica) – Try It Online"

AltStyle によって変換されたページ (->オリジナル) /