formatted 'time' data in calculations

Ross nospam at forMe.thks
Wed Jan 7 18:35:31 CET 2009

There seems to be no shortage of information around on how to use the 
time module, for example to use time.ctime() and push it into strftime 
and get something nice out the other side, but I haven't found anything 
helpful in going the other way.

That is, given some formatted text describing times - is there something 
that makes it easy to calculate time differences, or do I have to index 
my way through the string pulling out characters, converting to integers 

Data is formatted:

    t1 = 09:12:10
    t2 = 11:22:14

I want to calculate tdiff = t2-t1

Any suggestions? (Thanks for anything you can offer)


More information about the Python-list mailing list