timezone part of dates converted to "-{0}{1}"

Giganews Newsgroups
Subject: timezone part of dates converted to "-{0}{1}"
Posted by:  Michael Johnson (architeuthis6…@yahoo_.com)
Date: Fri, 8 Dec 2006

I've noticed that when I pop messages with Indy, or when I even load them from a file, the timezone part of the date is changed to "-{0}{1}". This causes some problems for me because some mail servers/applications interpret that as meaning time UTC, and some interpret it as meaning local time.

I am using Indy 10.1.5 for .NET.

Here is a sample program (I am being a weirdo and using Indy via managed C++):

    #include "stdafx.h"
    #include "assert.h"
    #using <mscorlib.dll>
    using namespace System;
    using namespace Indy::Sockets;
    int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
        Indy::Sockets::Message* msg = new Indy::Sockets::Message;
        msg->LoadFromFile("test_message.txt", false);
        msg->SaveToFile("saved_message.txt", false);
        return 0;

Content of test_message.txt:

    Date: Wed, 06 Sep 2006 11:34:57 -0500
    From: TestSender <testsend…@test.com>
    MIME-Version: 1.0
    To:  TestRecipient <testrecipie…@test.com>
    Subject: test message
    Content-Type: text/plain;

Content of saved_message.txt:

    Date: Wed, 6 Sep 2006 11:34:57 -{0}{1}      <-- note the change
    From: "TestSender" <testsend…@test.com>
    MIME-Version: 1.0
    To: "TestRecipient" <testrecipie…@test.com>
    Subject: =?UTF-8?B?dGVzdCBtZXNzYWdl?=
    Content-Type: text/plain