Skip to content

File modified time not updating under windows - expected behaviour? #2644

Answered by tt4g
neilstephens asked this question in Q&A
Discussion options

You must be logged in to vote

spdlog does not explicitly call the API to change the Last Modified Date.
This is due to the behavior of the Windows OS and file system.

Stack Overflow has a very similar question and a great answer on when Last Modified Date changes in Windows OS.

Quote answer (https://stackoverflow.com/a/51617747):

Flush is not the same as sync. The FileHandler just performs a flush after each record is published. Windows is not setup to force a writing of the metadata to the file system. From File “Date modified” property are not updating while modifying a file without closing it.:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by neilstephens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants