about time

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bugthefixer
Forum Contributor
Posts: 118
Joined: Mon Mar 22, 2004 2:35 am

about time

Post by bugthefixer »

i need to find difference of time like
if first time is 07:00 and last time is 12:00
then i need four times in between i.e.

(12:00-08:00)/4=01:00

first time=08:00+01:00
second time=first time+01:00 and so on..
how can i do that...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

[php_man]mktime[/php_man] returns a unix timestamp (an integer) .. then do your math from there..
Post Reply