Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FTIME inconsistent results across platforms
Message
 
To
12/02/2002 11:57:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00618906
Message ID:
00618944
Views:
8
>FTIME() is giving me different results by up to 2 seconds on some files. The files are on Win NT4.0 server and VFP7.0 is on W2K and Win98. The time stamp is different by 1 second either side on my VFP machines from the time stamp on WinNT4.0 Does anyone know why?
>
>Can I use a win32api (or other) function to directly access the timestamp on win NT4 to get consistent results?

Not really. :)

Here is the excerpt from the Platform SDK which explains the issue:

"Not all file systems can record creation and last access time and not all file systems record them in the same manner. For example, on NT FAT, create time has a resolution of 10 milliseconds, write time has a resolution of 2 seconds, and access time has a resolution of 1 day (really, the access date). On NTFS, access time has a resolution of 1 hour. Therefore, the GetFileTime function may not return the same file time information set using the SetFileTime function. Furthermore, FAT records times on disk in local time. However, NTFS records times on disk in UTC. For more information, see File Times."

I got it from the conversation with George Tasker when we discussed the very same issue. I was getting this 2seconds off result using Win API functions. You may see similar time results reported in Windows Explorer if you check timestamps in Properties of the same file copied to different servers.

So much for consistency... :)
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform