Witam.
Dlaczego przy użyciu poniższego sposobu dodania sekund do formatu DateTime
otrzymuję błąd?
$Time_Travel_Format = 'P' . strval($Time_Travel) . 'S';
$Attack_Time = new DateTime($Record[5]); //$Record[5] zawiera datę pobraną z bazy danych w formacie DateTime
if ($Time_Travel > 0){
$Attack_Time->add(new DateInterval($Time_Travel_Format));
echo $Time_Travel_Format;
}
Fatal error: Uncaught exception 'Exception' with message 'DateInterval::__construct(): Unknown or bad format (P3484S)'