2

i have this lines of code:

$veo = mktime (0,02,0,0,0,0);
$veo1 = mktime (0,03,0,0,0,0);
$dif = ($veo1 - $veo);
echo date("H:i",strtotime($dif));

The output is: 18:00 when it should be 00:01

Can you please help me?

I need to calculate the difference between those two times (of course in this example is easy)

Thanks

1 Answers1

0

Remove the strtotime() function in the last line of your code.

$dif is not string with human readable date format, it is a timestamp.

Filip Górny
  • 1,749
  • 16
  • 24