Jake Ball Jake Ball - 2 years ago 126
PHP Question

PHP round time() up (future) to next multiple of 5 minutes

How do I round the result of

up (towards the future) to the next multiple of 5 minutes?

Answer Source
 $now = time();     
 $next_five = ceil($now/300)*300;

This will give you the next round five minutes (always bigger or equal the current time).

I think that this is what you need, based on your description.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download