firefox timestamp

abhilash pp afilash at gmail.com
Tue Sep 9 07:10:11 CEST 2008


thanks Fredrik, yeah it works !!!

On Mon, Sep 8, 2008 at 8:11 PM, Fredrik Lundh <fredrik at pythonware.com>wrote:

> abhilash pp wrote:
>
>  I don't know if this question will fit on this section,
>> any way my query is , i have used one script demork.py to extract details
>> from Firefox history.dat file
>> and now the problem is how to convert the TIMESTAMP given by that to
>> normal date and time.
>> example timestams are like this,
>>
>> 1202919771609375
>> 1213874676203125
>> 1215693263859375
>>
>> i have used datetime module for this but it gave me error
>>
>
> a quick googling indicates that the file contains microseconds, not
> seconds.  dividing by 1e6 should do the trick:
>
> >>> t = 1202919771609375
> >>> datetime.datetime.fromtimestamp(t / 1e6)
> datetime.datetime(2008, 2, 13, 17, 22, 51, 609375)
>
> </F>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080909/3ae8deb3/attachment.html>


More information about the Python-list mailing list