f



Times Returned by TIME()

I would have posted this on the Quicksilver group but couldn't find it.

We have a Quicksilver system that picks up files from a Windows eftpos
application. There have been some slowdowns in the process and we've
added some logging to identify the culprit. When the QS app detects a
file, it writes a log record using time derived from TIME(). It shells
out to a Clipper app which returns ADIR() data on the file. What we are
finding on the test PC (XP) is that the ADIR() time of the file is
approximately 2 seconds later than the TIME() value recorded.

Does anyone have an explanation?

Thanks
David

0
djfoskey (5)
6/15/2006 10:48:52 PM
comp.lang.clipper 3959 articles. 0 followers. Post Follow

7 Replies
941 Views

Similar Articles

[PageSpeed] 53

few things you may elaborate to collect more relevant data:
1] is that file that clipper reports adir() persistent, i mean, may you
after examine completed review that file and check to see what the real time
stamp is?
2] is clipper ok ot time() ok?
3] instead of clipper's adir() try simple batch with dir %myfile% >
mylog.log
4] are you sure that time() is invoked at right moment the file is commited
to os?



<djfoskey@gmail.com> wrote in message
news:1150411732.796143.79930@r2g2000cwb.googlegroups.com...
> I would have posted this on the Quicksilver group but couldn't find it.
>
> We have a Quicksilver system that picks up files from a Windows eftpos
> application. There have been some slowdowns in the process and we've
> added some logging to identify the culprit. When the QS app detects a
> file, it writes a log record using time derived from TIME(). It shells
> out to a Clipper app which returns ADIR() data on the file. What we are
> finding on the test PC (XP) is that the ADIR() time of the file is
> approximately 2 seconds later than the TIME() value recorded.
>
> Does anyone have an explanation?
>
> Thanks
> David
>


0
sali5587 (72)
6/15/2006 11:31:06 PM
Hi Sali

1 There is a series of files that are deleted after they are read.
2 I don't understand your question
3 I need time to the second: dir reports to the minute
4 the log record, containing the TIME() value, is only invoked when the
file is detected using the FILE(filnam) call.
 Thanks, David

sali wrote:
> few things you may elaborate to collect more relevant data:
> 1] is that file that clipper reports adir() persistent, i mean, may you
> after examine completed review that file and check to see what the real time
> stamp is?
> 2] is clipper ok ot time() ok?
> 3] instead of clipper's adir() try simple batch with dir %myfile% >
> mylog.log
> 4] are you sure that time() is invoked at right moment the file is commited
> to os?
>
>
>
> <djfoskey@gmail.com> wrote in message
> news:1150411732.796143.79930@r2g2000cwb.googlegroups.com...
> > I would have posted this on the Quicksilver group but couldn't find it.
> >
> > We have a Quicksilver system that picks up files from a Windows eftpos
> > application. There have been some slowdowns in the process and we've
> > added some logging to identify the culprit. When the QS app detects a
> > file, it writes a log record using time derived from TIME(). It shells
> > out to a Clipper app which returns ADIR() data on the file. What we are
> > finding on the test PC (XP) is that the ADIR() time of the file is
> > approximately 2 seconds later than the TIME() value recorded.
> >
> > Does anyone have an explanation?
> >
> > Thanks
> > David
> >

0
djfoskey (5)
6/16/2006 12:22:28 AM
with 2] there wass typo, i wanted to ask do you find is adir() correct or is 
time() correct

there is some opinnion that clipper, being 16bit is only accurate up to 2sec 
[like old fat filesystem is], while xp/ntfs is more accurate.

yes, dir doesn't report seconds, but [for exaing] you may try this vbscript.
just put it in separate file, and call from cmd prompt with cscript 
ftime1.vbs [of course, you need target file to examine to be present]

ftime1.vbs -----------
dim fso,f
set fso=createobject("scripting.filesystemobject")
set f=fso.getfile("c:\temp\a.txt") 'replace target file "c:\temp\a.txt" with 
your
wscript.echo f.datecreated
----------------------
(some antivirus software wrongly detects *every* occurence of "getfile" like 
attack. allow it to execute once.

now, you may build your demo to check adir() and real ntfs time display. 
maybe they are hopelessly differ



<djfoskey@gmail.com> wrote in message 
news:1150417348.511440.193030@h76g2000cwa.googlegroups.com...
> Hi Sali
>
> 1 There is a series of files that are deleted after they are read.
> 2 I don't understand your question
> 3 I need time to the second: dir reports to the minute
> 4 the log record, containing the TIME() value, is only invoked when the
> file is detected using the FILE(filnam) call.
> Thanks, David
>
> sali wrote:
>> few things you may elaborate to collect more relevant data:
>> 1] is that file that clipper reports adir() persistent, i mean, may you
>> after examine completed review that file and check to see what the real 
>> time
>> stamp is?
>> 2] is clipper ok ot time() ok?
>> 3] instead of clipper's adir() try simple batch with dir %myfile% >
>> mylog.log
>> 4] are you sure that time() is invoked at right moment the file is 
>> commited
>> to os?
>>
>>
>>
>> <djfoskey@gmail.com> wrote in message
>> news:1150411732.796143.79930@r2g2000cwb.googlegroups.com...
>> > I would have posted this on the Quicksilver group but couldn't find it.
>> >
>> > We have a Quicksilver system that picks up files from a Windows eftpos
>> > application. There have been some slowdowns in the process and we've
>> > added some logging to identify the culprit. When the QS app detects a
>> > file, it writes a log record using time derived from TIME(). It shells
>> > out to a Clipper app which returns ADIR() data on the file. What we are
>> > finding on the test PC (XP) is that the ADIR() time of the file is
>> > approximately 2 seconds later than the TIME() value recorded.
>> >
>> > Does anyone have an explanation?
>> >
>> > Thanks
>> > David
>> >
> 


0
sali4098 (102)
6/16/2006 9:58:54 AM
Osoba podpisana jako <djfoskey@gmail.com> w artykule
<news:1150417348.511440.193030@h76g2000cwa.googlegroups.com> pisze:

> Hi Sali
>
> 3 I need time to the second

It is impossible by design of the DOS/FAT time format:
http://mail.python.org/pipermail/python-list/1999-December/018530.html

/----
wFatTime
Specifies the MS-DOS time. The time is a packed 16-bit value with
the following format:
{PRIVATE}Bits
Contents
0-4
Second divided by 2
5-10
Minute (0-59)
11-15
Hour (0-23 on a 24-hour clock)
\----

As you see, you can only have even number of seconds on FAT filesystems.

-- 
Andrzej P. Wozniak  uszer@pochta.onet.pl  (swap z<->h in address)

0
uszer (21)
6/16/2006 10:08:22 AM
Hi Sali

I'll try your script at work on Monday, but I think you probably have
hit upon the reason for the difference between times.

0
djfoskey (5)
6/17/2006 3:35:29 AM
Thanks Andrzej, I'll check this on Monday

0
djfoskey (5)
6/17/2006 3:36:45 AM
djfoskey@gmail.com wrote:
DIR and ADIR() do seem to give times to 2 second accuracy and round up.
The script times were earlier than the DIR times.

0
djfoskey (5)
6/19/2006 1:24:08 AM
Reply: