I edited and saved a text file, "fullname" on my Windows 7 computer. I ran the following two lines of code immediately after saving the edits to "fullname", and I expected both of the following lines of code to return almost the same number of seconds since the epoch:
print str(os.path.getmtime(fullname))
print str(time.mktime(t.timetuple()))
The second line of code was borrowed from How to convert a Python datetime object to seconds
The results were not even close:
"1494082110.0"
"1319180400.0"
I would like to know why the results were not close.
My ultimate goal is that I want to know how to generate a float date, matching a calendar date of my choosing, for use in the context of: win32file.SetFileTime(handle, CreatedTime , AccessTime , WrittenTime )
Any help in understanding these issues would be much appreciated.