Re: DateTime->modify('tomorrow') Bug in PHP 5.3 on Linux
| From: | Ángel González | Date: | Tue, 12 Mar 2013 18:08:57 +0000 |
| Subject: | Re: DateTime->modify('tomorrow') Bug in PHP 5.3 on Linux | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-66598@lists.php.net to get a copy of this message | ||
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'));