Opa Matheus,
Funcionou.
Já tinha feita assim:
import datetime
from dateutil.parser import *
data1 = parse("2012-04-11 00:59:16")
data2 = datetime.datetime.now()
diff = data2 - data1
diff = str(diff).split('.', 1)[0]
print diff
Mas sua solução ficou melhor.
On 11 abr, 17:02, Matheus Lima <
matheus...@gmail.com> wrote:
> Outra forma:
>
> >>> import time
> >>> time.strftime("%H:%M:%S",time.gmtime(diff.seconds))
>
> '07:03:59'
>
> Em 11 de abril de 2012 16:49, Matheus Lima <
matheus...@gmail.com> escreveu:
>
>
>
>
>
>
>
>
>
> > Não sei se é a melhor solução, mas pode ser uma solução temporária:
>
> > >>> print '%s:%s:%s' % (diff.seconds/3600, diff.seconds%3600/60,
> > diff.seconds%3600%60)
>
> > *
> > *
> > *Matheus dos Santos Lima ** <
http://twitter.com/matheeusLimaaa> <
http://www.orkut.com.br/Main#Profile?rl=mp&uid=6921349383894587556>
> > <
http://www.facebook.com/profile.php?id=100001639854566> *
> > Bel. em Sistemas de Informação - UFS (2011.2)
> > CSM <
http://www.scrumalliance.org/profiles/117413-matheus-dos-santos-lima>
>
> --
> Att,
> *
> *
> *Matheus dos Santos Lima ** <
http://twitter.com/matheeusLimaaa>
> <
http://www.orkut.com.br/Main#Profile?rl=mp&uid=6921349383894587556>
> <
http://www.facebook.com/profile.php?id=100001639854566> *
> Bel. em Sistemas de Informação - UFS (2011.2)
> CSM <
http://www.scrumalliance.org/profiles/117413-matheus-dos-santos-lima>