Your error seem to be coming from this line:
newelaptime = time.strptime(str(elapsed_time), "%H/%M/%S")
because you trying to convert Unix time (number of secs of the Unix Epoch - counted from 1.01.1970) which is number - into string - and then using strptime
trying to convert this into time object. ...which goes into error - because strptime
converts time from human-readable-string into time-object.
Unix Time is great for operators and calculating time ranges but not good for reading by human :)
To get human readable value - try something like this:
datetime.datetime.utcfromtimestamp(YOUR_UNIX_TIMESTAMP).strftime('%Y-%m-%dT%H:%M:%SZ')
it will give you a string 'YYYY-mm-dd H:M:Secs'
...shorter version like this:
datetime.datetime.utcfromtimestamp(YOUR_UNIX_TIMESTAMP)
...will give you a time object - which is great when you want to operate with (less mathematic / more calendar) units like months years etc.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…