php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16101 gmt exchange for mail function
Submitted: 2002-03-15 14:27 UTC Modified: 2002-06-02 19:51 UTC
Votes:6
Avg. Score:3.5 ± 1.0
Reproduced:3 of 3 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: francky dot leclerc at free dot fr Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.1.2 OS: winnt4
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: francky dot leclerc at free dot fr
New email:
PHP Version: OS:

 

 [2002-03-15 14:27 UTC] francky dot leclerc at free dot 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-18 05:09 UTC] francky dot leclerc at free dot fr
$header="Date: ".date("r");
Simplified Header !
 [2002-04-09 23:40 UTC] previn at smarts dot net dot 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-04-10 00:19 UTC] previn at smarts dot net dot au
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
 [2002-06-02 19:51 UTC] mfischer@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 11:01:28 2024 UTC