A version for Python:
ex=[
'21-18:26:30',
'06-00:15:30',
'15:28:37',
'48:14',
'00:01'
]
def etime_to_secs(e):
t=e.replace('-',':').split(':')
t=[0]*(4-len(t))+[int(i) for i in t]
return t[0]*86400+t[1]*3600+t[2]*60+t[3]
for e in ex:
print('{:11s}: {:d}'.format(e, etime_to_secs(e)))