-1

I want to calculate the time difference in Hours, Minutes and seconds between two-time intervals.

Here is my Code

 $actualLoginTime = strtotime('13:49:13.0000000');
 $loginTime = strtotime('09:00:00.0000000');
 $nInterval = ($actualLoginTime) - ($loginTime);
 {{date("H:i:s ", strtotime($nInterval))}}

It's giving me the wrong Output and showing the difference 5:00:00.

Can you guys please help me.

sunny
  • 1,511
  • 5
  • 20
  • 57

1 Answers1

0

I found the solution to my Question by using gmdate() function:

echo gmdate("H:i:s", $nInterval );
sunny
  • 1,511
  • 5
  • 20
  • 57