▼ TSさん
> あまりに大胆なエラーなので(必ずエラーになる様に書いてある)
> 他の方のIndyはどうなのか結果が知りたいです。
では,テスト結果のみです.
(1) 新規プロジェクトに以下を配置
TButton 1個
TEdit 2個
TIdHTTP 1個
(2) オブジェクトインスペクタで
Edit1のTextプロパティにThu,27 Jul 2002 01:35:52 GMTをセット
(4) テストコードは以下
// usesにIdDateTimeStampを追加
//
function RFC822ToDateTime(ARFC822String: string): TDateTime;
begin
with TIdDateTimeStamp.Create(nil) do
try
//RFC 準拠の日付および時刻の値からTIdDateTimeStampの日付および時刻を取得
SetFromRFC822(ARFC822String);
Result := AsTDateTime ;
finally
Free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
d1 : TDateTime;
st1 : string;
begin
//Indtyバージョン確認用
Panel1.Caption := IdHTTP1.Version;
//Edit1.text='Thu,27 Jul 2002 01:35:52 GMT';
d1 := RFC822ToDateTime(Trim(Edit1.text));
//Edit2.text=2002/07/27 1:35:52
Edit2.text := DateTimeToStr(d1);
end;
全てWindows XP(SP3)
Delphi6(UP2) Pro Indy 10.2.3
To do item undone.
Delphi7 Pro Indy 9.00.10
Edit2.Textの値が1899/12/30となる
Delphi2007-R2 Pro Indy 10.1.5
To do item undone.
Delphi2009(UP3) Pro Indy 10.5.7
ValidateTimeStamp() function in IdDateTimeStamp.pas is not implemented yet.
「IdDateTimeStamp.pas is not implemented yet.」とは
一体どういう意味なんでしょう?
Delphi2010(UP5) Pro Indy 10.5.5(Delphi2010のデフォルトバージョン)
To do item undone.
さて.
|