Jump to content

time interval


sandy1028

Recommended Posts

Hi,

 

The code below displays the time from 0th hour to cur time.

Please help me to find the time from curtime to previous 24 hours.

 

Suppose if the time is 05:23 how to set the time to 05:20.

 

I want all the miutes and hours of the 1 day interval from now() 05:00,04:50,04:40......................................

 

Please help me with this

 

 

 

$t= time();

$timetostop=mktime(0,0,0,date("m"),date("d")-1,date("y"));

$timetostop=date("m-d-Y",$timetostop);

$date=date("m-d-Y",$t);

while($date != $timetostop)

{

  echo '

'.date("m-d-Y H",$t);

  $t=$t-600;

  $date=date("m-d-Y",$t);

}

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/87205-time-interval/#findComment-446063
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.