php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8909 PHP generates the Date: header line with a bad timezone
Submitted: 2001-01-25 11:54 UTC Modified: 2001-11-30 04:28 UTC
From: rthornto at pictel dot com Assigned:
Status: Closed Package: Mail related
PHP Version: 4.0.4pl1 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rthornto at pictel dot com
New email:
PHP Version: OS:

 

 [2001-01-25 11:54 UTC] rthornto at pictel dot com
If the PHP mail() function is allowed to generate the "Date:" header field, the sign of the timezone is inverted.

The system "timezone" is the number of minutes difference between UTC and local time (EST= +300).  In the Date: header, the timezone is formatted as "HHMM" and is the difference between local time and UTC (reversed difference, EST= -0500).

In win32/sendmail.c, the sign of the system "timezone" variable is copied to the Date: header without being inverted.

Also, there should be a sign even if the timezone offset is 0.  Therefore in sprintf() that generates the "Date:" header in the PostHeader() function, the timezone test should read:
      (_timezone > 0) ? "-" : "+",

This problem was also in the PHP3 source.

Regard, -Ron-

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-22 18:28 UTC] hholzgra@php.net
windows mailcode needs a rewrite
 [2001-11-30 04:28 UTC] derick@php.net
This is now fixed in CVS (I hope).

Derick
 [2002-01-23 12:41 UTC] tob at golflink dot net
This is marked as closed but I'm still seeing this same problem on the latest windows release. 4.1
 [2002-01-23 16:09 UTC] walter dot pollard at unisys dot com
To: Derick@php.net,

      Derick, which release is this problem fixed in? We are running PHP Version 4.0.6 and are experiencing the same problem.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue May 11 14:01:34 2021 UTC