I'm trying to verify the time of most recent modification of a file and got to the following:
print("before", time.time())
with open(file, "wb") as fh:
fh.write(b"12345")
print("after", time.time())
print("modified", os.path.getmtime(file))
I expect before < modified < after. But the output reads:
before 1693392599.8838775
after 1693392599.8839073
modified 1693392599.8792782
What am I missing? Thank you.