php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32599 mail() generates an incorrect Date header during Daylight Savings Time
Submitted: 2005-04-05 23:58 UTC Modified: 2005-04-06 13:53 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mike-php at emerge2 dot com Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.3.10 OS: Windows 2000
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: mike-php at emerge2 dot com
New email:
PHP Version: OS:

 

 [2005-04-05 23:58 UTC] mike-php at emerge2 dot com
Description:
------------
Problem: An email message sent with the mail() function under PHP 4.3.10 on Windows 2000 has an incorrect Date header during Daylight Savings Time.

The identical problem was reported in http://bugs.php.net/bug.php?id=28685. However, in that closed bug report, it was claimed that PHP does not add a Date header.

I believe that PHP does send a Date header, and an incorrect one at that. When I telnet to my SMTP server, and manually send an email that is missing the Date header, the SMTP server adds a correct one. When I send an email, to the same SMTP server, using the mail() function in PHP 4.3.10 under Windows 2000, the Date header is incorrect. I am certain that it is PHP that is generating the incorrect Date header.

Another bug report also talks about this problem:
http://bugs.php.net/bug.php?id=24912

That report makes mention of the Windows Date Control Panel. 
Interestingly, a call to date( 'r' ) returns the expected string, and pays attention to the setting in the Date Control Panel. However, mail() sends the same non-daylight-savings-time string no matter how the Date Control Panel is set. 

Perhaps mail() could simply call PHP's own date( 'r' ) function?


Reproduce code:
---------------
mail('mike-php@emerge2.com', 'My Subject', 'This is a test.');


Expected result:
----------------
(other headers omitted)
Date: Tue, 05 Apr 2005 15:28:59 -0400


Actual result:
--------------
(other headers omitted)
Date: Tue, 05 Apr 2005 15:28:59 -0500


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-06 13:53 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #29334

 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 01 10:03:45 2023 UTC