Re: com php-src: Use UTC instead of unavailable timezone in test:ext/date/tests/timestamp-in-dst.phpt
| From: | Christoph M. Becker | Date: | Wed, 23 Nov 2016 17:46:48 +0000 |
| Subject: | Re: com php-src: Use UTC instead of unavailable timezone in test:ext/date/tests/timestamp-in-dst.phpt | ||
| References: | 1 2 3 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-96002@lists.php.net to get a copy of this message | ||
On 23.11.2016 at 16:30, Nikita Popov wrote:
> On Wed, Nov 23, 2016 at 1:08 PM, Christoph M. Becker <cmbecker69@gmx.de>
> wrote:
>
>> Hi Nikita!
>>
>> On 22.11.2016 at 19:29, Nikita Popov wrote:
>>
>>> Commit: c31396f85ea2c986bb2d828a8321b73d778000dc
>>> Author: Craig Duncan <git@duncanc.co.uk> Sun, 20 Nov 2016
>> 16:40:37 +0000
>>> Committer: Nikita Popov <nikic@php.net> Tue, 22 Nov 2016 19:29:49
>> +0100
>>> Parents: 04534b0047819dab067eb09c56c68879608f00cd
>>> Branches: master
>>>
>>> Link:
>>> http://git.php.net/?p=php-src.git;a=commitdiff;h=
>> c31396f85ea2c986bb2d828a8321b73d778000dc
>>>
>>> Log:
>>> Use UTC instead of unavailable timezone in test
>>>
>>> Changed paths:
>>> M ext/date/tests/timestamp-in-dst.phpt
>>>
>>>
>>> Diff:
>>> diff --git a/ext/date/tests/timestamp-in-dst.phpt
>> b/ext/date/tests/timestamp-in-dst.phpt
>>> index bef18ee..79ca0a6 100644
>>> --- a/ext/date/tests/timestamp-in-dst.phpt
>>> +++ b/ext/date/tests/timestamp-in-dst.phpt
>>> @@ -1,10 +1,9 @@
>>> --TEST--
>>> Format timestamp in DST test
>>> --INI--
>>> -date.timezone=CEST
>>> +date.timezone=UTC
>>
>> This test is meant to test formatting timestamps when DST is active in
>> the default timezone[1]. However, UTC has never DST. Using something
>> like Europe/London would at least check that half of the time, but using
>> an explicit DST timezone would be preferable. I don't know which one we
>> could use, though, as we likely want to avoid the "other" timezones.
>>
>> [1] <z:Y–‘†À!Ü�
>> ÈYhttp://git.php.net/?p=php-src.git;a=commit;h=ec5157fe0>
>
> Hey,
>
> I thought so as well, however Derick pointed out in
> https://github.com/php/php-src/pull/2210#issuecomment-262218265
> that when @
> is used the timezone is always set to UTC, so it doesn't make sense to use
> a different timezone (especially not a non-existent one, of course). I'm
> not familiar with ext/date, so maybe I misunderstood this.
Well, Derick had written the test[1], so he's probably right. :-)
[1]
<https://github.com/php/php-src/commits/master/ext/date/tests/timestamp-in-dst.phpt>
--
Christoph M. Becker