> there is a bug in OverbyteIcsHttpSrv.pas in function FileDate
Here's a fix, if you confirm that it works I'll check it in soon
(borrowed from code in OverbyteIcsFtpSrvT.pas) :
function FileDate(FileName : String) : TDateTime;
var
SearchRec : TSearchRec;
Status : Integer;
{$IFDEF MSWINDOWS}
LInt64 : Int64;
const
FileTimeBase = -109205.0; // days between years 1601 and 1900
FileTimeStep: Extended = 24.0 * 60.0 * 60.0 * 1000.0 * 1000.0 * 10.0; //
100 nsec per Day
{$ENDIF}
begin
Status := FindFirst(FileName, faAnyFile, SearchRec);
try
if Status <> 0 then
Result := 0
else
{$IFDEF MSWINDOWS}
Move(SearchRec.FindData.ftLastWriteTime, LInt64, SizeOf(LInt64));
Result := (LInt64 / FileTimeStep) + FileTimeBase;
{$ENDIF}
{$IFDEF POSIX}
Result := OverbyteIcsUtils.IcsDateTimeToUTC(SearchRec.TimeStamp);
{$ENDIF}
finally
FindClose(SearchRec);
end;
end;
--
Arno
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be