[PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux

2013-03-12 Thread Christian Stoller
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:

Re: [PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux

2013-03-12 Thread Derick Rethans
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; ?

Re: [PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux

2013-03-12 Thread Jonathan Sundquist
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

Re: [PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux

2013-03-12 Thread Derick Rethans
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

Re: [PHP-DEV] Re: [VOTE] Allow non-scalar keys in foreach

2013-03-12 Thread Nikita Popov
On Mon, Mar 11, 2013 at 8:42 PM, Dmitry Stogov dmi...@zend.com wrote: On Mon, Mar 11, 2013 at 10:27 PM, Nikita Popov nikita@gmail.comwrote: On Mon, Mar 11, 2013 at 9:50 AM, Dmitry Stogov dmi...@zend.com wrote: Hi Nikita, The patch looks good. I have just few comments - In

Re: [PHP-DEV] Re: [VOTE] Allow non-scalar keys in foreach

2013-03-12 Thread Dmitry Stogov
Hi Nikita, I suppose it must fine now, but let me take a quick look tomorrow morning. Thanks. Dmitry. On Tue, Mar 12, 2013 at 8:43 PM, Nikita Popov nikita@gmail.com wrote: On Mon, Mar 11, 2013 at 8:42 PM, Dmitry Stogov dmi...@zend.com wrote: On Mon, Mar 11, 2013 at 10:27 PM, Nikita

Re: [PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux

2013-03-12 Thread Ángel González
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