Skip to content

Timezone Europe/Berlin does not have DST transitions #268

@thekid

Description

@thekid

With a current PHP 8.1 build, we see these when running the date & time test suite.

PHP 8.0, expected result

$ xp -w 'use util\{Date, TimeZone}; $tz= new TimeZone("Europe/Berlin"); return $tz->previousTransition(Date::now())'
util.TimeZoneTransition@{
  transition at: 2021-03-28 03:00:00+0200
  transition to: 7200 (CEST), DST
}

PHP 8.1-dev, incorrect

$ xp -w 'use util\{Date, TimeZone}; $tz= new TimeZone("Europe/Berlin"); return $tz->previousTransition(Date::now())'
Uncaught exception: Exception lang.IllegalArgumentException (Timezone Europe/Berlin does not have DST transitions.)
# ...

$ xp -e 'phpinfo()' | head -8
phpinfo()
PHP Version => 8.1.0-dev

System => Windows NT SURFACE 10.0 build 19042 (Windows 10) AMD64
Build Date => Apr 16 2021 23:42:47
Build System => Microsoft Windows Server 2019 Datacenter [10.0.17763]
Compiler => Visual C++ 2019
Architecture => x64

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions