首页 新闻 会员 周边 捐助

delphi中,为什么在获取时间的时候会出现时间参数无效呢? 在线等 很急很关键~各位大神求指导

0
悬赏园豆:100 [已关闭问题] 关闭于 2016-06-02 14:56

function TfrmEBook.ReBooking:Boolean;
var
//ReadTimeout,ConnectTimeout : integer ;
// ConnectTimeout: integer;
FIdhttp : TIdHTTP;
RStream : TStringStream;
strUrl,strStampDate,strDate : string;
strJSonData : widestring;
Digest: TSHA1Digest;
strBookingSHA1:AnsiString;
begin
Result := False;
strBookingSHA1 := '';
strDate :=FormatDateTime('YYYY-MM-dd hh:nn:ss',strStatusDate);
strStampDate :=FormatDateTime('YYYY-MM-dd hh:nn:ss',Now());
strBookingSHA1 :='companyid='+strCompanyId+'&pageindex='+inttostr(CurrentPage)+'&timestamp='+strStampDate+'&updatetime='+strDate+'||'+strPlanKeyid;
HashString(AnsiToUtf8(strBookingSHA1),Digest);
strBookingSHA1 := BytesToBase64(Digest);
strBooking:='companyid='+HTTPEncode(strCompanyId)+'&pageindex='+inttostr(CurrentPage)+'&timestamp='+HTTPEncode(strStampDate)+'&updatetime='+HTTPEncode(strDate)+'&hash='+HTTPEncode(strBookingSHA1);
RStream := TStringStream.create('');
FIdhttp := TIdHTTP.Create(nil);
strUrl :='http://apis.yundangnet.com/api/v1/sea-order?'+strBooking;
strJSonData := '';
try
//FIdhttp.ConnectTimeout:= 3000;
//FIdhttp.ReadTimeout := 6000 ;
FIdhttp.Get(strUrl,RStream);
strJSonData := widestring(UTF8Decode(RStream.DataString));
finally
FIdhttp.Disconnect;
RStream.Free;
FreeAndNil(FIdhttp);
end;

出现的报错是:invalid argument to date encode~

黄色为报错的点

寻_梦繁华的主页 寻_梦繁华 | 初学一级 | 园豆:102
提问于:2015-12-23 09:39
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册