Use date, converted to UTC:
$ date -d@36 -u +%H:%M:%S
00:00:36
$ date -d@1036 -u +%H:%M:%S
00:17:16
$ date -d@12345 -u +%H:%M:%S
03:25:45
The limitation is the hours will loop at 23, but that doesn't matter for most use cases where you want a one-liner.
On macOS, run brew install coreutils
and replace date
with gdate
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…