diff --git a/src/PhpSpreadsheet/Calculation/Engineering.php b/src/PhpSpreadsheet/Calculation/Engineering.php index 5b7fae57..239fae5d 100644 --- a/src/PhpSpreadsheet/Calculation/Engineering.php +++ b/src/PhpSpreadsheet/Calculation/Engineering.php @@ -1531,7 +1531,7 @@ class Engineering } $binX = ''; foreach (str_split($x) as $char) { - $binX .= str_pad(hex2bin($char), 3, '0', STR_PAD_LEFT); + $binX .= str_pad(base_convert($char, 16, 2), 3, '0', STR_PAD_LEFT); } if (strlen($binX) == 40 && $binX[0] == '1') { for ($i = 0; $i < 40; $i++) { diff --git a/src/PhpSpreadsheet/Shared/Date.php b/src/PhpSpreadsheet/Shared/Date.php index 7ae7ce68..3c1cdeba 100644 --- a/src/PhpSpreadsheet/Shared/Date.php +++ b/src/PhpSpreadsheet/Shared/Date.php @@ -137,7 +137,7 @@ class Date $hours = round($dateValue * 24); $mins = round($dateValue * 1440) - round($hours * 60); $secs = round($dateValue * 86400) - round($hours * 3600) - round($mins * 60); - $returnValue = (integer) gmmktime($hours , $mins, $secs); + $returnValue = (integer) gmmktime($hours, $mins, $secs); } $timezoneAdjustment = ($adjustToTimezone) ?