I am trying to identify the number of seconds that have elapsed given a time string. These time strings are not always consistent.
Examples:
'01:02' = 1 minute, 2 seconds = 62 seconds
'1-11:01:02' = 1 day, 11 hours, 1 minute, 2 seconds = 126062 seconds
I have tried time.strptime, but I didn't see a way to elegantly perform this operation. Any ideas?