Probably i found the reason
I have to change there rows
$publish_up = date(DATE_ATOM, mktime(0, 0, 0, date('m',$timestamp), 20, date('y',$timestamp)));
$publish_down = date("Y-m-d H:i:s", $publish_up+(86400*$level_duration*$result->order_product_quantity));
With
$publish_up = mktime(0, 0, 0, date('m',$timestamp), 20, date('y',$timestamp));
$publish_down = strtotime("+".$level_duration*$result->order_product_quantity." day", $publish_up);
Or
$publish_down = mktime(0, 0, 0, date('m',$timestamp), 20+($level_duration*$result->order_product_quantit),date('y',$timestamp));
Is it correct? I cannot test it until tomorrow.