Bug #16101 Updated: gmt exchange for mail function
| From: | previn at smarts dot net dot au | Date: | Wed, 10 Apr 2002 04:19:08 +0000 |
| Subject: | Bug #16101 Updated: gmt exchange for mail function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-4502@lists.php.net to get a copy of this message | ||
ID: 16101
Updated by: previn@smarts.net.au
Reported By: francky.leclerc@free.fr
Status: Open
Bug Type: Mail related
Operating System: winnt4
PHP Version: 4.1.2
New Comment:
Actually the problem is what is being returned by the date() function.
For example, the following function call:
date('O')
returns: -0800 when the timezone on the server is definitely set to
+0800.
I presume that the mail command is simply calling the date function and
that is why it is wrong.
Previn
Previous Comments:
------------------------------------------------------------------------
[2002-04-09 23:40:25] previn@smarts.net.au
Same problem for me on W2K Server (IIS 5) using PHP 4.0.4pl1. GMT +0800
(correct timezone) goes out as GMT -0800.
Previn
------------------------------------------------------------------------
[2002-03-18 05:09:29] francky.leclerc@free.fr
$header="Date: ".date("r");
Simplified Header !
------------------------------------------------------------------------
[2002-03-15 14:27:37] francky.leclerc@free.fr
Php4.1.2 win32 binaries download from php.net !
I'm trying to send a mail from my server with a little simple script.
mail("myadd@org.com","MySubject","MyMail")
The mail arrive, but the time 'send time' was with a bad gmt time.
System mail
gmt+0100 gmt-0100
gmt-0100 gmt+0100
gmt+0000 gmt+0100
gmt+0200 gmt-0200
The mail function in win32 system exchange the sign of the gmt.
To Walk around this problem I send a 'Date' header with the good gmt
set :
$header = "Date: ".date("D, d M Y H:i:s O");
Thanks for debug.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16101&edit=1