I've never dealt with the DAYTIME format before.
I guess you mean DateTime? If so, it's a very useful record, that you really
should get used to. You can find out all about it, in the IDE, by pressing Ctrl-F1 with the cursor located on the word. Basically it's a record defined, in the DOS unit, as:
DateTime = record
Year,Month,Day,Hour,Min,Sec: Word;
end;
Here's a little test program for you, just to get you started. Add the variable DT to your Watch window in the IDE and then trace through the program with F8 to the line with Unix2Norm, press F7 to get into the UnixUtil unit, and
then more F8 to see how DT changes in the Unix2Norm procedure.
uses UnixUtil, Dos;
var DT: DateTime;
unixtime: longint;
function z2p(W: word): string;
begin
z2p:=chr(W div 10 + 48) + chr(W mod 10 + 48)
end;
begin
unixtime:=$7fffffff;
Unix2Norm(unixtime, DT);
with DT do begin
write('Unixtime will only be valid until');
write(' ',Year,'-',z2p(Month),'-',z2p(Day));
write(' ',z2p(Hour),':',z2p(Min),':',z2p(Sec));
writeln
end
end.
---
* Origin:
news://felten.yi.org (2:203/2)