1

I have an android application that call services to upload image to server. I need to convert the time in seconds that i uploaded to the php side into Hour:Minute:Second format. Since I ma totally new to php, I need some help to achieve that. Any help would be appreciated. Thanks

Alex Chengalan
  • 7,891
  • 3
  • 40
  • 54

2 Answers2

3

its simple.. use gmdate("H :i :s",$time );

Riyaz
  • 139
  • 11
0
$time = 654654; //time in seconds.

$hours = intval($time / 3600);
$minutes = intval(($time - 3600 * $hours)/60);
$seconds = $time % 60;
Loïc
  • 11,262
  • 1
  • 28
  • 46