Date: Tue, 30 Jun 1998 10:14:16 +0300 (IDT) From: Eli Zaretskii To: "Salvador Eduardo Tropea (SET)" cc: djgpp-workers AT delorie DOT com Subject: Re: Windows 9X/NT file times In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 29 Jun 1998, Salvador Eduardo Tropea (SET) wrote: First, thanks a lot for running the tests on your machine. > I got: > > foo1 06/29/1998 15:39:13.280 06/29/1998 00:00:00.000 06/29/1998 15:47:50.000 > foo2 06/29/1998 15:39:21.030 06/29/1998 00:00:00.000 06/29/1998 15:47:50.000 > foo3 06/29/1998 15:39:25.140 06/29/1998 00:00:00.000 06/29/1998 15:47:50.000 > foo4 06/29/1998 15:39:26.510 06/29/1998 00:00:00.000 06/29/1998 15:47:50.000 > foo5 06/29/1998 15:39:27.620 06/29/1998 00:00:00.000 06/29/1998 15:47:50.000 > foo6 06/29/1998 15:39:28.610 06/29/1998 00:00:00.000 06/29/1998 15:47:50.000 > foo7 06/29/1998 15:39:29.520 06/29/1998 00:00:00.000 06/29/1998 15:47:50.000 > foo8 06/29/1998 15:39:30.560 06/29/1998 00:00:00.000 06/29/1998 15:47:50.000 > foo9 06/29/1998 15:39:31.960 06/29/1998 00:00:00.000 06/29/1998 15:47:50.000 > > Surprise! Creation in the future! Sorry, I don't see where's the creation in the future in this output. The creation time is the first time printed, so in your example it is *before* the last-write (aka modification) time, which is the last of the three times printed by the program. (Programs which look at the time file was modified, like GNU Make, use the modification time.) > 4) Now: touch foo[1-9]: > > foo1 06/29/1998 15:51:12.380 06/29/1998 00:00:00.000 06/29/1998 15:51:44.000 > foo2 06/29/1998 15:51:17.940 06/29/1998 00:00:00.000 06/29/1998 15:51:44.000 > foo3 06/29/1998 15:51:19.870 06/29/1998 00:00:00.000 06/29/1998 15:51:44.000 > foo4 06/29/1998 15:51:20.720 06/29/1998 00:00:00.000 06/29/1998 15:51:44.000 > foo5 06/29/1998 15:51:21.540 06/29/1998 00:00:00.000 06/29/1998 15:51:44.000 > foo6 06/29/1998 15:51:22.410 06/29/1998 00:00:00.000 06/29/1998 15:51:44.000 > foo7 06/29/1998 15:51:23.280 06/29/1998 00:00:00.000 06/29/1998 15:51:44.000 > foo8 06/29/1998 15:51:24.200 06/29/1998 00:00:00.000 06/29/1998 15:51:44.000 > foo9 06/29/1998 15:51:25.130 06/29/1998 00:00:00.000 06/29/1998 15:51:44.000 > > Again! the files are in the future. Looks like touch is messing the > creation time. I don't see how is this test significant. `touch' doesn't change the creation time at all, it only changes the modification time and the last-access time, even on Windows 9X. And since the last-access time is only a date, you will only see the change in the modification time, unless you wait past midnight. So the above results seem okay to me: `touch' has changed the modification time, but left the creation time intact. To compare the creation and modification time, you need to delete the files before running `touch', so that both times are (theoretically) the same. At least on my system, this always causes the modification time to lag behind the creation time, which is expected behavior since the modification time has 2-second granularity.