Time and date on the basis of seconds elapsed since 1970 year
Question: Using python I have to retrieve value of time and date of an event knowing how
many seconds elapsed since `01/01/1970 00:00:00`.

I started with:

    
    
    from datetime import timedelta
    a = timedelta(seconds=1317365200)
    print "%d days %02d:%02d:%02d" % (a.days, a.seconds / 3600, (a.seconds / 60) % 60, a.seconds % 60)1317365200
    

`

Record of seconds elapsed are stored in **Sqlite 3** database.


Answer: 
    from datetime import datetime
    a = datetime.fromtimestamp(1317365200)
    print a
    

