Skip to content

Commit

Permalink
Fix for PHP 8.1
Browse files Browse the repository at this point in the history
- Passing null to non-nullable internal function parameters is deprecated.
  • Loading branch information
JackieDo committed Mar 14, 2022
1 parent 18418d8 commit 07e760b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Jackiedo/Timezonelist/Timezonelist.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Timezonelist
*/
protected function formatTimezone($timezone, $continent, $htmlencode=true)
{
$time = new DateTime(null, new DateTimeZone($timezone));
$time = new DateTime('', new DateTimeZone($timezone));
$offset = $time->format('P');

if ($htmlencode) {
Expand Down

0 comments on commit 07e760b

Please sign in to comment.