FW: [PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux
Hi Derick. The 5.3.14 result is correct. It was apparently a bug in earlier 5.3 versions. cheers, Derick Thanks for this hint. So I guess that Debian has not ported the bugfix. Do you know the Git Revision of the patch? I would like to inform the PHP maintainers of Debian so that they can easily integrate the fix. Thanks for help!
[PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux
Dear internals, I have a strange bug with DateTime-modify('tomorrow') in PHP 5.3 on Linux. Code to reproduce: ?php $d = new DateTime('2013-02-05 06:33:33'); echo $d-format('Y-m-d H:i:s').\n; $d-modify('tomorrow'); echo $d-format('Y-m-d H:i:s').\n; ? Current output on Windows with PHP 5.3.14: 2013-02-05 06:33:33 2013-02-06 00:00:00 Current output on Linux (Debian) with PHP 5.3.3-7+squeeze15: 2013-02-05 06:33:33 2013-02-06 06:33:33 Can somebody verify this behavior? Are there any information about that or is there already something in the bugtracker? I have googled but couldn't find anything about that. Best regards Christian Stoller
Re: [PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux
On Tue, 12 Mar 2013, Christian Stoller wrote: I have a strange bug with DateTime-modify('tomorrow') in PHP 5.3 on Linux. Code to reproduce: ?php $d = new DateTime('2013-02-05 06:33:33'); echo $d-format('Y-m-d H:i:s').\n; $d-modify('tomorrow'); echo $d-format('Y-m-d H:i:s').\n; ? Current output on Windows with PHP 5.3.14: 2013-02-05 06:33:33 2013-02-06 00:00:00 Current output on Linux (Debian) with PHP 5.3.3-7+squeeze15: 2013-02-05 06:33:33 2013-02-06 06:33:33 Can somebody verify this behavior? Are there any information about that or is there already something in the bugtracker? I have googled but couldn't find anything about that. The 5.3.14 result is correct. It was apparently a bug in earlier 5.3 versions. cheers, Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux
Why would the result not preserve the time? On Tue, Mar 12, 2013 at 11:04 AM, Derick Rethans der...@php.net wrote: On Tue, 12 Mar 2013, Christian Stoller wrote: I have a strange bug with DateTime-modify('tomorrow') in PHP 5.3 on Linux. Code to reproduce: ?php $d = new DateTime('2013-02-05 06:33:33'); echo $d-format('Y-m-d H:i:s').\n; $d-modify('tomorrow'); echo $d-format('Y-m-d H:i:s').\n; ? Current output on Windows with PHP 5.3.14: 2013-02-05 06:33:33 2013-02-06 00:00:00 Current output on Linux (Debian) with PHP 5.3.3-7+squeeze15: 2013-02-05 06:33:33 2013-02-06 06:33:33 Can somebody verify this behavior? Are there any information about that or is there already something in the bugtracker? I have googled but couldn't find anything about that. The 5.3.14 result is correct. It was apparently a bug in earlier 5.3 versions. cheers, Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux
No top posting please! On Tue, 12 Mar 2013, Jonathan Sundquist wrote: On Tue, Mar 12, 2013 at 11:04 AM, Derick Rethans der...@php.net wrote: Current output on Windows with PHP 5.3.14: 2013-02-05 06:33:33 2013-02-06 00:00:00 Current output on Linux (Debian) with PHP 5.3.3-7+squeeze15: 2013-02-05 06:33:33 2013-02-06 06:33:33 Can somebody verify this behavior? Are there any information about that or is there already something in the bugtracker? I have googled but couldn't find anything about that. The 5.3.14 result is correct. It was apparently a bug in earlier 5.3 versions. Why would the result not preserve the time? Because tomorrow starts at midnight. You want +1 day. cheers, Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux
On 12/03/13 17:30, Derick Rethans wrote: On Tue, 12 Mar 2013, Jonathan Sundquist wrote: Why would the result not preserve the time? Because tomorrow starts at midnight. You want +1 day. cheers, Derick Alternatively, $d-add(new DateInterval('P1D')); -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php