Skip to content

Commit ae2660f

Browse files
committed
Clean up PHP versions in TZ fix
1 parent 7b61e36 commit ae2660f

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/TimeZone.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,7 @@ public static function fromNativeDateTimeZone(DateTimeZone $dateTimeZone): TimeZ
7777
* the correct offset including seconds, so let's use it to make a correction if we have an offset-based TZ.
7878
* This has been fixed in PHP 8.1.20 and PHP 8.2.7.
7979
*/
80-
if ($parsed instanceof TimeZoneOffset
81-
&& (
82-
(PHP_VERSION_ID >= 8_01_07 && PHP_VERSION_ID < 8_01_20)
83-
|| (PHP_VERSION_ID >= 8_02_00 && PHP_VERSION_ID < 8_02_07)
84-
)
85-
) {
80+
if ($parsed instanceof TimeZoneOffset && PHP_VERSION_ID < 8_02_07) {
8681
return TimeZoneOffset::ofTotalSeconds($dateTimeZone->getOffset(new DateTimeImmutable()));
8782
}
8883

0 commit comments

Comments
 (0)