Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email sent time up 1 hour?

Status
Not open for further replies.

J304

Programmer
Jan 30, 2003
8
GB
I need some help please...
I have a php script which sends an email using the time on the PC via a batch file. This has been working great for months now until recently.

The clocks went forward an hour(GMT London) and my PC automatically put the time forward.

Now every email is send at 1pm when received in any email provider is says sent 2pm and recieved 1pm??

PHP must be adding on an hour when sending to compensate the time. But my PC has already done this and has the correct time. The only solution i could find so i put the clock on my PC back an hour and trigger the email the times are right but the PC clock is wrong....

Help im going mad! Anybody have this issue and fixed it!
 
I'm a little confused as to what your problem is.... and I have a feeling that your mail server is the one setting the time wrong.

You send an email (how do you send it?) and "it" says sent 2pm and another "it" says received 1pm...

So I'm assuming you're talking UK to UK mail here.

Anyway, if you look at the mail headers there's likely a field which says something like
Date: Thu, 01 Apr 2004 23:23:23 -0000 (or -0600 if you were in my time zone) And I'm guessing your mail server has that offset incorrectly set right now.
 
I am using the mail() function in php to send emails.
The php program is hosted on a PC on a network.
when i trigger the php script and the email is sent back to a email provider like MS Outlook the time comes back as being sent at 2pm and received at 1pm.
Now if i change the time on the PC hosing the php back an hour to the current time (i.e if its 12am put time to 11am)
Then trigger the Php script the times come back as being correct.
As this has not happend since the UK (GMT London) time has been put forward.
Either the PC whic is running win2000 is putting an hour on the email time or php is doing this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top