When you save a form or a unit, the form or unit's creation date is updated to the time of modification. The date modified changes, as expected, but the date created also changes. Why is the modification time not updated exclusively?
Asked
Active
Viewed 244 times
5
-
Interesting, never noticed this. Delphi can (optionally) save the last couple of changes to a __history sub folder. Maybe it moves the file when it does, expecting the IDE to create the new file anyway. Is it a problem for you, btw? Do you use this date in your process? – GolezTrol Apr 15 '19 at 12:56
-
1That is exactly the case: the old file is renamed and a new file is created during the save process. AFAIK, that has been that way for ages - even before the history folder was invented. – Uwe Raabe Apr 15 '19 at 13:15
-
Haven't noticed that, too. But if you are using a VCS (e.g. SVN), the file creation date doesn't matter anyways. A SVN checkout command sets the file dates to "$now" – Delphi Coder Apr 15 '19 at 13:29
-
3So, is the question really if anyone has ever noticed that the creation date of a form/unit is updated to the modification date? Hard to answer, but I'll take my chances... Yes, there are people who have noticed this. – Sertac Akyuz Apr 15 '19 at 14:08
-
Thank you all for your comments. – FJSpillane Apr 15 '19 at 15:42
1 Answers
0
When saving source files the Delphi IDE deletes the existing files and replaces them with new ones. If you need to keep track of these operations a version control system is the preferred option.

J...
- 30,968
- 6
- 66
- 143
-
Not according to what [Process Monitor](https://learn.microsoft.com/en-us/sysinternals/downloads/procmon) shows. But it seems that Delphi is setting the creation and modification times to the unit and project files manually. – SilverWarior Apr 15 '19 at 16:34