I am importing a excel , it seems from source the date is coming like this : "2021-04-08T12:36:12+03:00"
i used the function
public function transformDate($value) try { return \PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($value); } catch (\ErrorException $e) { return '-1'; }
this function did a exception , if i used strtotime(2021-04-08T12:36:12+03:00) , it return bad date like : 0616-05-07 00:05:00
i can't find the correct function
strtotime, post your full code: 3v4l.org/GAnrtDateTimeclass. Its constructor can parse this string perfectly.