I'm experiencing a weird problem where a file modified time changes after some time.
Here is what happens:
- C# DotNetCore app running on Win10.
- Opens file over SMB on Debian (Proxmox) with ZFS and Samba.
- App modifies file, and records size and modified timestamp for later use.
- Time passes.
- App processes same file, compares modified timestamp with stored timestamp, and it changed.
- The file did not change, only the timestamp reported changed.
If I had to guess; this looks like some kind of SMB caching issue where the timestamp reported over SMB does not match the actual file timestamp, and opening the same file later then reports a different timestamp.
I cannot reproduce this on demand, but I can observe the behavior by looping and reading the modified time, waiting, re-reading, repeat, and after some time, sometimes, the reported modified changes from previous values.
How can I get a more deterministic timestamp behavior?
SOCIAL SHARE CARD GENERATOR