|Posted by:||Remy Lebeau \(TeamB\) (firstname.lastname@example.org)|
|Date:||Sun, 8 Jul 2007|
"Sanford Aranoff" <arano…@analysis-knowledge.com> wrote in message
> Received email, stepped through with the debugger.
> DateTimeToStr(Msg.Date) '07/06/2007 11:23:00 AM'
> Msg.headers.values['Date'] 'Fri, 6 Jul 2007 15:23:00 EDT'
> HOW CAN THIS BE?
> The msg.date is clearly wrong.
You did not say which version and build of Indy you are using. Clearly, the
handling of GMT offsets is off by 4 hours. That suggests to me that you are
probably using an old version. There have been GMT-related fixes in newer
> It was not sent out at 11:23. If it was sent out with the correct
> values.date, how can the msg.date be different?
The TIdMessage.Date property is a TDateTime, not a String. The
Values['Date'] value is parsed and converted according to RFC standards.
That includes applying GMT offsets when needed. There is no offset
specified in the original Values['Date'] string, so Indy applies the GMT
offset of the local machine only. In some releases of Indy, there were
issues with retreiving that offset correctly.
Date posted by Sanford Aranoff on Fri, 06 Jul 2007