#32599 [NEW]: mail() generates an incorrect Date header during Daylight Savings Time

From: Date: Tue, 05 Apr 2005 21:58:16 +0000
Subject: #32599 [NEW]: mail() generates an incorrect Date header during Daylight Savings Time
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76777@lists.php.net to get a copy of this message
From: mike-php at emerge2 dot com Operating system: Windows 2000 PHP version: 4.3.10 PHP Bug Type: Mail related Bug description: mail() generates an incorrect Date header during Daylight Savings Time 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 -- Edit bug report at http://bugs.php.net/?id=32599&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32599&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32599&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32599&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32599&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32599&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32599&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32599&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32599&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32599&r=support Expected behavior: http://bugs.php.net/fix.php?id=32599&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32599&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32599&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32599&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32599&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32599&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32599&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32599&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32599&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32599&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32599&r=mysqlcfg

« previous php.bugs (#76777) next »