time.strftime('%m-%d-%Y %H:%m:%S') to log is out of order
Piet van Oostrum
piet at cs.uu.nl
Tue Jul 21 17:38:43 EDT 2009
>>>>> davidj411 <davidj411 at gmail.com> (d) wrote:
>d> I am using a recursive function to print the time and a few other
>d> things on each pass. ( the function calculates size of file that is
>d> being transferred and if not 100 % copied, it waits 20 secs and checks
>d> again).
>d> i would expect the time to be correct anytime it is used:
>d> <--code below -->>
>d> print time.strftime('%m-%d-%Y %H:%m:%S')
>d> <--code above -->>
>d> here is an example of what i am seeing:
>d> 16:07:16
>d> 16:07:36
>d> 16:07:56
>d> 16:07:16
>d> 16:07:36
>d> 16:07:56
>d> 16:07:16
>d> 16:07:36
>d> 16:07:56
You probably meant: print time.strftime('%m-%d-%Y %H:%M:%S')
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org
More information about the Python-list
mailing list