So I have this code:
$laikas = htmlspecialchars($_POST['rodymolaikas']);
$laikas = date( "H:i:s", strtotime( $laikas ) );
$videotrukme = $_POST['videotrukme'];
$videotrukme1 = round($videotrukme);
$videotrukme2 = sprintf('%02d:%02d:%02d', ($videotrukme1/3600),($videotrukme/60%60), $videotrukme%60);
$laikas_end = date('H:i:s', strtotime($laikas) + strtotime($videotrukme2));
echo $laikas_end;
The variables are even to:
$laikas = 17:00:00;
$videotrukme2 = 00:01:12;
But the answer I get is:
laikas_end = 02:00:00
Could you please tell me why is that happening?