The error "Undefined array key 'year'" is most likely caused by an invalid date format being passed to the fromFormat method of the Jalalian class.
Make sure that the date format passed to fromFormat matches the format of the $date variable.
For example, if the $date variable is in the format "1399/05/25 12:30:00", the correct format string to pass to fromFormat would be "Y/m/d H:i:s".
Here's an updated version of the code with the correct format string:
public function store(Product $product, Warranty $warranty, Request $request)
{
$date = $request->post('new_date');
$timestamp = Jalalian::fromFormat('Y/m/d H:i:s', $date)->getTimestamp();
dd($timestamp);
}