need to print seconds from the epoch including the millisecond

matt.doolittle33 at gmail.com matt.doolittle33 at gmail.com
Sun Dec 29 21:44:03 EST 2013


On Friday, December 27, 2013 7:25:42 PM UTC-5, Cameron Simpson wrote:
> On 27Dec2013 07:40, matt.doolittle33 at gmail.com <matt.doolittle33 at gmail.com> wrote:
> 
> > I am on Ubuntu 12.10.   I am still working with the 2 decimal
> 
> > places. Sometime ago i had this issue and I forget how i solved it.
> 
> > maybe i used datetime? thanks!
> 
> 
> 
> Repeatedly people have asked you to show your exact code. Still nothing.
> 
> 
> 
> Here's a clue, from a Gentoo box running kernel 3.2.1-gentoo-r2:
> 
> 
> 
>   $ python
> 
>   Python 2.7.2 (default, Feb  9 2012, 18:40:46)
> 
>   [GCC 4.5.3] on linux2
> 
>   Type "help", "copyright", "credits" or "license" for more information.
> 
>   >>> import time; print time.time()
> 
>   1388190100.44
> 
>   >>> import time; time.time()
> 
>   1388190102.795531
> 
>   >>>
> 
> 
> 
> Please show us _exactly_ what you're doing. I'm guessing that print
> 
> is confusing you.
> 
> 
> 
matt at matt-Inspiron-1525:~$ python
Python 2.7.3 (default, Sep 26 2013, 16:38:10) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time; print time.time()
1388371148.39
>>> import time; time.time()
1388371173.556624
>>> 

i get the same result as you expect.  so its got to be the write statement that is truncated the decimal places right?  



More information about the Python-list mailing list