php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74474 Strange first Transition
Submitted: 2017-04-19 17:16 UTC Modified: 2017-04-19 21:22 UTC
From: getriebesand at freenet dot de Assigned: cmb (profile)
Status: Not a bug Package: timezonedb (PECL)
PHP Version: 7.1.4 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: getriebesand at freenet dot de
New email:
PHP Version: OS:

 

 [2017-04-19 17:16 UTC] getriebesand at freenet dot de
Description:
------------
The first transition seems to be wrong.

The first 2 Transitions of Europe/Berlin are:

    [0] => Array
        (
            [ts] => -9223372036854775808
            [time] => -292277022657-01-27T08:29:52+0000
            [offset] => 7200
            [isdst] => 1
            [abbr] => CEST
        )

    [1] => Array
        (
            [ts] => -1693706400
            [time] => 1916-04-30T22:00:00+0000
            [offset] => 7200
            [isdst] => 1
            [abbr] => CEST
        )

both have isdst = 1 and same offset. This means that before 1916 was always DST?

Test script:
---------------
array_slice(
  (new \DateTimeZone('Europe/Berlin'))->getTransitions(),
  0,
  2
);

Expected result:
----------------
    [0] => Array
        (
            [ts] => -9223372036854775808
            [time] => -292277022657-01-27T08:29:52+0000
            [offset] => 3600
            [isdst] => 
            [abbr] => CST
        )

    [1] => Array
        (
            [ts] => -1693706400
            [time] => 1916-04-30T22:00:00+0000
            [offset] => 7200
            [isdst] => 1
            [abbr] => CEST
        )

Actual result:
--------------
    [0] => Array
        (
            [ts] => -9223372036854775808
            [time] => -292277022657-01-27T08:29:52+0000
            [offset] => 7200
            [isdst] => 1
            [abbr] => CEST
        )

    [1] => Array
        (
            [ts] => -1693706400
            [time] => 1916-04-30T22:00:00+0000
            [offset] => 7200
            [isdst] => 1
            [abbr] => CEST
        )

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-19 17:49 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2017-04-19 17:49 UTC] cmb@php.net
I can't confirm this, see <https://3v4l.org/kvR5f>.

Which timezonedb version do you use?
 [2017-04-19 18:14 UTC] getriebesand at freenet dot de
-Status: Feedback +Status: Assigned
 [2017-04-19 18:14 UTC] getriebesand at freenet dot de
the version is 0.system
we use the debian php package 
7.1.4-1+0~20170411221130.22+jessie~1.gbp4ea64a

do we need to install the PECL extension?
 [2017-04-19 21:22 UTC] cmb@php.net
-Status: Assigned +Status: Not a bug
 [2017-04-19 21:22 UTC] cmb@php.net
> do we need to install the PECL extension?

I suggest to do so, and to file a ticket with the respective
Debian package.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC