Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Apr : Problem with LoadFromFile/Stream Indy 10
| Subject: | Problem with LoadFromFile/Stream Indy 10 |
| Posted by: | "Jos de Bruijn" (jos@nospam.nl) |
| Date: | Tue, 24 Apr 2007 13:41:12 |
Hi,
I'm using Indy 10.
When I load an IdMessage from a file or stream it seems to have an incorrect
date property.
It always seems to be 2 hours of from what it should be.
my test code:
var Msg: TIdMessage;
stream: TMemoryStream;
begin
IdMessage1.LoadFromFile(ExtractFilePath(ParamStr(0))+'msg.txt');
cxDateEdit1.Date := IdMessage1.Date;
stream := TMemoryStream.Create;
Msg := TIdMessage.Create;
try
IdMessage1.SaveToStream(stream);
stream.Position := 0;
msg.LoadFromStream(stream);
cxDateEdit2.Date := msg.Date;
finally
stream.Free;
msg.Free;
end;
msg.txt:
Received: from ([127.0.0.1]) with MailEnable ESMTP; Tue, 24 Apr 2007
13:13:24 +0200
Received: from LT02 ([194.123.155.185])
(authenticated bits=0)
by smtp-vbr11.xs4all.nl (8.13.8/8.13.8) with ESMTP id l3OBDKPu096842
for <MyTest@MyDomain.nl>; Tue, 24 Apr 2007 13:13:23 +0200 (CEST)
(envelope-from Me@MyDomain.nl)
Reply-To: Me@MyDomain.nl
From: "Jos" <Me@MyDomain.nl>
To: MyTest@MyDomain.nl
Subject: Test
Date: Tue, 24 Apr 2007 15:13:19 +0000
Organization: Welcome CCS
Message-ID: <000801c78661$90b94880$0f02a8c0@MyDomain.local>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="Bpz9taarvNpIoXtTytfaFxqTrsUl=_iEkD"
X-Mailer: Microsoft Office Outlook 11
Thread-Index: AceGYY+wN9xMQAr3SKCHD9BB6p+T5w==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-MS-TNEF-Correlator: 00000000FE746518566761468BE315A0EEA2448724002700
X-Virus-Scanned: by XS4ALL Virus Scanner
In-Reply-To: <000801c78661$90b94880$0f02a8c0@welcome.local>
This is a multi-part message in MIME format.
--Bpz9taarvNpIoXtTytfaFxqTrsUl=_iEkD
Content-Type: text/plain ; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Test mail datum
=20
Met vriendelijke groet,
Jos
=20
--Bpz9taarvNpIoXtTytfaFxqTrsUl=_iEkD--
.
The values for the first date field: 24-4-2007 17:13:19
The values for the sec date field: 24-4-2007 19:13:19
Can anyone explain this to me??
Thanks,
Jos de Bruijn