ID:               43452
 Updated by:       [EMAIL PROTECTED]
 Reported By:      sean dot thorne at gmail dot com
-Status:           Assigned
+Status:           Closed
 Bug Type:         Date/time related
 Operating System: *
 PHP Version:      5.2CVS-2008-10-21 (note: Fixed in PHP_5_3!)
 Assigned To:      derick
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

I merged this last weekend, so closing.


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

[2008-11-02 13:17:52] [EMAIL PROTECTED]

Derick, this bug has obviously been fixed in PHP_5_2. As it has been 
a bugfix why isn't it committed to PHP_5_2?!

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

[2008-10-21 12:05:00] [EMAIL PROTECTED]

Derick, feedback was given..

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

[2008-10-16 23:18:39] [EMAIL PROTECTED]

Confirmed it broken in 5.2.7-dev as well.

Since it appears to be fixed in 5.3-alpha3-dev, is there any chance
this fix can be backported?

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

[2008-10-16 22:56:28] [EMAIL PROTECTED]

I had second thoughts about the "timestamp" passed into strtotime(), so
I tried to create the date in a slightly different way but it failed
never the less.

I can also confirm this on 5.2.6_2 on FreeBSD.

Additional code:

Works:
<?php
// 2008-12-02
echo date('Y-m-d', strtotime('first Tuesday December 2008'));
?>

Does not:
<?php
// 2008-12-08
echo date('Y-m-d', strtotime('first Monday December 2008'));
?>

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

[2008-10-16 16:29:22] [EMAIL PROTECTED]

Sorry to re-open, I found the same bug on:
PHP Version 5.2.6-pl6-gentoo

Some code to reproduce:
<?php
echo date('Y-m-d', strtotime('first Monday', mktime(0, 0, 0, 12, 1,
2008)));
?>

Shows 2008-12-08, while indeed the first Monday in December is
2008-12-01.



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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/43452

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

Reply via email to