Re: com php-src: Fix bug73858.phpt to work in months without 31 days: ext/date/tests/bug73858.phpt
| From: | Derick Rethans | Date: | Thu, 02 Mar 2017 11:24:58 +0000 |
| Subject: | Re: com php-src: Fix bug73858.phpt to work in months without 31 days: ext/date/tests/bug73858.phpt | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-97215@lists.php.net to get a copy of this message | ||
Hi,
please please talk to me before doing that, I now have to deal with
conflicts in all the tests that I was fixing :-/
cheers,
Derick
On Thu, 2 Mar 2017, Nikita Popov wrote:
> Commit: 29333550d2237d472193ae2bf4aec53a7bc5648a
> Author: Mitch Hagstrand <mhagstrand@gmail.com> Wed, 1 Mar 2017 15:08:59 -0800
> Committer: Nikita Popov <nikita.ppv@gmail.com> Thu, 2 Mar 2017 12:13:06 +0100
> Parents: e80ea04c79fb1bb38cdd836e0622f7598727e888
> Branches: PHP-7.0 PHP-7.1 master
>
> Link:
> http://git.php.net/?p=php-src.git;a=commitdiff;h=29333550d2237d472193ae2bf4aec53a7bc5648a
>
> Log:
> Fix bug73858.phpt to work in months without 31 days
>
> Used hardcoded months in bug73858.phpt rather than the current and previous
> month.
>
> Bugs:
> https://bugs.php.net/73858
>
> Changed paths:
> M ext/date/tests/bug73858.phpt
>
>
> Diff:
> diff --git a/ext/date/tests/bug73858.phpt b/ext/date/tests/bug73858.phpt
> index 72474d3..5b619b1 100644
> --- a/ext/date/tests/bug73858.phpt
> +++ b/ext/date/tests/bug73858.phpt
> @@ -7,8 +7,8 @@ In the "verbose setup method" I'm trying setup the DateTime
> object myself
> to see if it's the format string which is parsed in correctly or if it's the
> DateTime
> object which is breaking stuff. From the testing it appears DateTime is broken somehow.
> */
> -$ss = 'first day of last month midnight';
> -$es = 'first day of this month midnight - 1 second';
> +$ss = 'first day of March midnight';
> +$es = 'first day of April midnight - 1 second';
>
> $s = new DateTime($ss);
> $e = new DateTime($es);
> @@ -50,7 +50,7 @@ effect on the results of the diff. By modifying the datetime with ->modify
> every
> it just means you have to be careful of how we work with DateTimes .
> */
> $s = new DateTime($ss);
> -$e = new DateTime('first day of this month midnight');
> +$e = new DateTime('first day of April midnight');
> $e->modify('- 1 second');
> var_dump($e->diff($s)->days); // 30 ... and should be 30
> ?>
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
https://derickrethans.nl | https://xdebug.org | https://dram.io
Like Xdebug? Consider a donation: https://xdebug.org/donate.php
twitter: @derickr and @xdebug