ID:               29334
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php dot time dot bug at aaronoff dot com
-Status:           Assigned
+Status:           Open
 Bug Type:         Mail related
 Operating System: win32
 PHP Version:      4CVS, 5CVS (2005-02-05)
 Assigned To:      sniper


Previous Comments:
------------------------------------------------------------------------

[2005-02-05 03:36:25] [EMAIL PROTECTED]

uh..simple "yes, it works / no, it still is wrong." would have been
enough. I know very well what DST is, you don't need to explain me how
to test this..




------------------------------------------------------------------------

[2005-02-03 16:38:45] php dot time dot bug at aaronoff dot com

< AFAIK, this was fixed.. >

Time problems are very tricky.

One needs to realize that DST is operative between March and October.
This "fix" is reported in February, when DST has no effect on system
time. So, to test this, I first needed to edit Windows 2000 time
properties with TZEDIT.EXE (a Resource Kit tool) and I set things up so
that DST started in October and ended in March. I also set the "daylight
bias" to 5 hours, just to make the DST effect very obvious. (The GMT
offset and daylight bias are _additive_, so DST should move the local
system time 6 hours ahead of GMT.)

I then reset the system time by going into Control Panel, Date/Time
applet, Time Zone tab, choosing another time zone and pushing the Apply
button, then returning to the reconfigured time zone and pushing the
Apply button again. The new time, 6 hours ahead of GMT, was visible in
the system tray clock.

The PHP version installed on my system was still the same 4.3.8.8
version that contained the DST bug.

I revised my PHP script to comment out the workaround for the DST bug
and sent an e-mail message via PHP through my local mail server (MS IIS
5.0 SMTP) to my ISP's SMTP server.

When I recovered the message in my e-mail client, I saw that the Date:
header contained the system time with a +0100 GMT offset. This is the
wrong time. It should be +0600. So, I re-confirmed the bug in version
4.3.8.8, as expected.

I then completely uninstalled PHP 4.3.8.8 and installed the 4.3.11.11
"STABLE latest" version. The PHP.INI file was reconfigured for use
under IIS.

I returned to the same PHP script and resent an e-mail message through
my local mail server to my ISP's SMTP server.

When I recovered the message in my e-mail client, I saw that the Date:
header contained the system time with a +0100 GMT offset. This is
*still* the wrong time.

** The DST bug has not been fixed in version 4.3.11.11. **

Finally, I dropped a message stub into my SMTP server's Pickup
directory. The stub contained From:, To:, and Subject: headers and a
simple body. There was no Date: header.

The message was sent and I recovered it from the same ISP server I'd
used for the PHP tests.

The Date: header in the recovered message contained a +0600 GMT offset.
The correct time was added to the e-mail header by IIS.

PHP still needs to be fixed to do the same thing.

regards, Andy

------------------------------------------------------------------------

[2005-02-03 05:00:38] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

AFAIK, this was fixed..


------------------------------------------------------------------------

[2004-07-22 18:25:19] php dot time dot bug at aaronoff dot com

Description:
------------
I'm using the mail() function to send a message from my home SMTP
server to my domain's SMTP server via my installation of MS IIS 5.0
SMTP under W2K SP4.

The time zone for my home PC is GMT +0200 in summer (with DST), +0100
in winter (w/o DST). In Windows Control Panel, Date/Time Properties,
Time Zone tab, the time zone shows as +0100 and "Automatically adjust
time for daylight saving changes" is checked. DST, then, increases the
offset on my PC from +0100 to +0200.

The e-mail message retrieved by my e-mail client from my domain's SMTP
server has a message header Date field set to the right hour but at GMT
offset +0100 -- this is the wrong time. Since my e-mail client displays
messages with time sent corrected to my local time, it adds an hour and
the message shows with a time one hour *ahead* of the time it was
actually sent.

Ex: message sent by mail() at 16:10 +0200
    Date field in message header on home SMTP server shows 16:10 +0100
<-- this is the wrong time!
    message sent by home SMTP server at 16:10 +0200
    message received by e-mail client from domain at 16:11 +0200
    e-mail client shows sent message time of 17:10 +0200

If a text message with just From:, To: and Subject: headers is dropped
into the home SMTP "Queue" folder, the home SMTP server adds the local
time with the correct GMT offset to the message header Date field. This
shows that the problem is not coming from the home SMTP server itself,
but from the program that's providing it with date information.

IMHO, mail() is not using the correcting the GMT offset for DST.

I've been unable to find any mention of an INI-file parameter for this,
Googling results were meager, and I found no open bugs.

HTH.

regards, Andy

Reproduce code:
---------------
mail($dest,$subject,$body)

Expected result:
----------------
The Date: field in the message's header should show the correct hour
and GMT offset.

Actual result:
--------------
The Date: field in the message's header shows the correct hour but the
wrong GMT offset -- it's not corrected for DST.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29334&edit=1

Reply via email to