Python Binary File CTime 4 Bytes
Question: I am trying to parse a binary file for which I have the file format for. I
have 3-4byte variables that are list as "CTime" I read them in using
struct.unpack. I want to convert this number to an actual day time year value.
The value that I have seems to be the number of seconds passed since an
absolute beginning. I remember in R there is some way that you can get the
date back from the seconds elapsed. Is there a way of doing this in python? or
even if I should be reading in the CTime as an integer.

I read: [Convert ctime to unicode and unicode to ctime
python](http://stackoverflow.com/questions/4750522/convert-ctime-to-unicode-
and-unicode-to-ctime-python) but its not quite what I'm trying to do.

Thanks in advance


Answer: 
    import datetime
    import time
    seconds_since_epoch = time.time()
    print datetime.datetime.fromtimestamp(seconds_since_epoch)
    
     #prints "2012-09-06 16:29:48.709000"
    

