Alaska Software Inc. - SMTPClient() puts wrong time stamp on email
Username: Password:
AuthorTopic: SMTPClient() puts wrong time stamp on email
JohnSMTPClient() puts wrong time stamp on email
on Fri, 02 Aug 2002 10:32:07 -0400
I wrote a simple mail program derived from the ASINET sample
programs for sending mail.  I didn't modify the SENDMAIL
code at all.

When it sends an email (which works fine) the outgoing time/date
stamp shows 4 hours 'later' than the current machine time.

I'm in the Eastern Daylight Savings time zone (USA).  We are
presently 5 hours behind GMT.  So my first thought was that
the email 'time stamp' was somehow tied to GMT - but that
appears to not be the case.   As it is off 4 hours, not 5.

Am I the only one who sees this happening?  It shows up on
both Windows 98 and NT machines.

Is there a way to correct this?

Its an oddity that isn't breaking anything - but does cause some
users to raise questions when an email appears to have arrived
4 hours before it was sent!  :<)

John
JohnRe: SMTPClient() puts wrong time stamp on email
on Tue, 06 Aug 2002 07:25:11 -0400
Is there nobody home?   I guess all the Alaska folks have gone on Holiday
again?  

I could use a little helpful advice on this one guys...
phil@idep.org.uk Re: SMTPClient() puts wrong time stamp on email
on Tue, 06 Aug 2002 12:48:25 +0000
>Is there nobody home?   I guess all the Alaska folks have gone on Holiday
>again?  
>
>I could use a little helpful advice on this one guys...

Well, at least on of them is going on holiday today , but the usual
reason no-one responds, is because no thnks they can help. Alaska
usually pop by and see if they can offer help on the NG's, but this is
only when they get a chance - remmber this is a USER support forum,
not an official portal for Alaska support.

Let me take another look at your message...

Regards,
phil@idep.org.uk Re: SMTPClient() puts wrong time stamp on email
on Tue, 06 Aug 2002 13:01:52 +0000
>I wrote a simple mail program derived from the ASINET sample
>programs for sending mail.  I didn't modify the SENDMAIL
>code at all.
>
>When it sends an email (which works fine) the outgoing time/date
>stamp shows 4 hours 'later' than the current machine time.
>
>I'm in the Eastern Daylight Savings time zone (USA).  We are
>presently 5 hours behind GMT.  So my first thought was that
>the email 'time stamp' was somehow tied to GMT - but that
>appears to not be the case.   As it is off 4 hours, not 5.
>
>Am I the only one who sees this happening?  It shows up on
>both Windows 98 and NT machines.
>
>Is there a way to correct this?

Well, the problem seems pretty straightforward, although baffling.

The first thing to establish, is what date field are you referring to?
Remember that the 'official' date field is 'Date:', but you could be
looking at one of the 'Recieved' fields.

I just ran the sample mail program, and trapped the mail at my server.
It shows the correct date and time:

Date: Tue, 6 Aug 2002 12:55:21 +0100

I suggest you try this too and  at least confirm that the sample
program works ok.

Next step would be to write the header of the message to a text file,
and check that against what you recieve in the email (you'd have to
send the message to yourself, of course).

3rd step, would be to run through the program with the debugger and
see when the time gets adjusted. If you included the logging facility,
that may help you to trap the erroneous code as well.

I'm sorry I can't offer you any directions to offending code/set-up,
but this really is just a debugging issue.

Regards,
John McDermonRe: SMTPClient() puts wrong time stamp on email
on Tue, 06 Aug 2002 10:42:02 +0000
Here is the message header info:
----------------------------------------------------------------
Received: from nowhere.com (NTFS1 [10.1.1.21]) by xxxx.lantaltextiles.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
	id QAX6Y61Y; Tue, 6 Aug 2002 00:40:10 -0400
From: NTFS1
To: johnm@lantaltextiles.com
Cc: 
Date: Tue, 6 Aug 2002 04:40:10 -0400
Subject: Overnite Processing Completed      
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
-----------------------------------------------------------------

The entry:   "Date: Tue, 6 Aug 2002 04:40:10 -0400"
should read: "Date: Tue, 6 Aug 2002 00:40:10 -0400", as is
shown in the Received entry above it.  This message is being
sent and received by the same mail server...so I'm perplexed
by the different time stamp entries.

This error causes the "Sent date" in Outlook Express to show
as 4 hours later than the "Receive date".  I suspect that 
those who live within the GMT time zone don't have a problem.

I'll try to chase it down locally.  It is possible that it has
something to do with our SMTP server itself - but this is the
only program that has ever shown this time stamp problem.  I
suspect it has to do with the fact that SMTPClient() does not
correctly talk with our SMPT server (Microsoft Exchange).

If anyone else has any idea, I'd love to hear about it.  Meanwhile,
at least this is not a show-stopper of a problem.







================================================================================

> >I wrote a simple mail program derived from the ASINET sample
> >programs for sending mail.  I didn't modify the SENDMAIL
> >code at all.
> >
> >When it sends an email (which works fine) the outgoing time/date
> >stamp shows 4 hours 'later' than the current machine time.
> >
> >I'm in the Eastern Daylight Savings time zone (USA).  We are
> >presently 5 hours behind GMT.  So my first thought was that
> >the email 'time stamp' was somehow tied to GMT - but that
> >appears to not be the case.   As it is off 4 hours, not 5.
> >
> >Am I the only one who sees this happening?  It shows up on
> >both Windows 98 and NT machines.
> >
> >Is there a way to correct this?
> 
> Well, the problem seems pretty straightforward, although baffling.
> 
> The first thing to establish, is what date field are you referring to?
> Remember that the 'official' date field is 'Date:', but you could be
> looking at one of the 'Recieved' fields.
> 
> I just ran the sample mail program, and trapped the mail at my server.
> It shows the correct date and time:
> 
> Date: Tue, 6 Aug 2002 12:55:21 +0100
> 
> I suggest you try this too and  at least confirm that the sample
> program works ok.
> 
> Next step would be to write the header of the message to a text file,
> and check that against what you recieve in the email (you'd have to
> send the message to yourself, of course).
> 
> 3rd step, would be to run through the program with the debugger and
> see when the time gets adjusted. If you included the logging facility,
> that may help you to trap the erroneous code as well.
> 
> I'm sorry I can't offer you any directions to offending code/set-up,
> but this really is just a debugging issue.
> 
> Regards,
> 
>
phil@idep.org.uk Re: SMTPClient() puts wrong time stamp on email
on Wed, 07 Aug 2002 10:00:41 +0000
>Received: from nowhere.com (NTFS1 [10.1.1.21]) by xxxx.lantaltextiles.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13)
>	id QAX6Y61Y; Tue, 6 Aug 2002 00:40:10 -0400

This is written by the router in the SMTP server.

>Date: Tue, 6 Aug 2002 04:40:10 -0400

This is written by the mail-client generating the message.

>This error causes the "Sent date" in Outlook Express to show
>as 4 hours later than the "Receive date".  I suspect that 
>those who live within the GMT time zone don't have a problem.

I doubt that it's a time-zone thing (although the difference in the
actual time and the time-zone offset (-0400)) might be relevant.
Currently I am at GMT+0100, but the sample mail pogram doesn't get it
wrong.  Have you checked the sample mail program is correct? If it is,
then it will undoubtedly be something in your amended code.

Regards,
John McDermonRe: SMTPClient() puts wrong time stamp on email
on Thu, 08 Aug 2002 10:33:52 +0000
I added my own destination email address to the array containing the test destination that the sample MAIL.PRG used.  I then used this to send an email.

This email was sent at 10:22am on Aug 8, 2002, but shows a "Sent date" of 12:22pm on Aug 8, 2002.

I now suspect that our SMTP server may be doing this for reasons I don't understand.  As it is the first point which handles the email, perhaps it doesn't have something setup properly to adjust for the offset from GMT?

Anyway, thanks for the patient help.  I've about reconciled myself to the idea that this is just one small quirk I'll have to accept.

John McDermon
John McDermonRe: SMTPClient() puts wrong time stamp on email
on Thu, 08 Aug 2002 11:02:03 +0000
Correction: the "sent date" in my prior post should have read 2:22pm, 
not 12:22pm as I indicated.  It was again off by 4 hours.

Meanwhile, I just went through all the Microsoft Exchange settings 
and found nothing that even hints at being related to the time stamp 
that is put on email - particularly "relayed email".  If I send the 
email using Outlook or Outlook Express (via SMTP/POP3), the sent date 
appears correctly.  It is only when I use the SMTPClient() to send 
email that this time/date stamp is wrong.

I realize that Outlook and Outlook Express are each acting as an email
"client" and thus properly tag the outgoing email time/stamp.  What I 
am not clear about is where in the process the erroneous time/stamp 
comes from when using SMTPClient() to send an email.

Again - this isn't a shop stopper of a problem.  More of a quirk that 
has got me stumped.

John
Thomas BraunRe: SMTPClient() puts wrong time stamp on email
on Fri, 09 Aug 2002 07:42:56 +0200
Hi John,

> Again - this isn't a shop stopper of a problem.  More of a quirk that 
> has got me stumped.

IMHO you should contact Alaska support so they can check where
this problem comes from. Maybe others can avoid this problem then 

Thomas Braun
Donald R. KeatingRe: SMTPClient() puts wrong time stamp on email
on Sat, 17 Aug 2002 18:20:21 -0400
Hi Y'all,

Just noticed I have same "problem".  Mail is received 4 hours before
it is sent in the tests I'm running.

So, maybe by now someone has an answer?

TIA,

    >don<


"Thomas Braun" <tb@wegasoft.de> wrote in message
news:3d5366af$2@asgcom.alaska-software.com...
> Hi John,
>
> > Again - this isn't a shop stopper of a problem.  More of a quirk
that
> > has got me stumped.
>
> IMHO you should contact Alaska support so they can check where
> this problem comes from. Maybe others can avoid this problem then

>
> Thomas Braun
>
Manfred SchipflingerRe: SMTPClient() puts wrong time stamp on email
on Mon, 25 Nov 2002 10:53:31 +0100
We also have the same problem.

Manfred Schipflinger
Thaler EDV-Systeme GmbH
Austria


"Donald R. Keating" <DonK@dbscompany.com> schrieb im Newsbeitrag
news:3d5ecaed$1@asgcom.alaska-software.com...
> Hi Y'all,
>
> Just noticed I have same "problem".  Mail is received 4 hours before
> it is sent in the tests I'm running.
>
> So, maybe by now someone has an answer?
>
> TIA,
>
>     >don<
>
>
> "Thomas Braun" <tb@wegasoft.de> wrote in message
> news:3d5366af$2@asgcom.alaska-software.com...
> > Hi John,
> >
> > > Again - this isn't a shop stopper of a problem.  More of a quirk
> that
> > > has got me stumped.
> >
> > IMHO you should contact Alaska support so they can check where
> > this problem comes from. Maybe others can avoid this problem then
> 
> >
> > Thomas Braun
> >
>
>