 <p>To solve this problem, you need to figure out when the last quarter was. Then it's as easy as going back from there. Here's how I would do it:</p> <pre><code>$minute = idate('i'); $qdiff = $minute % 15; $lastQuarter = time() - $qdiff*60; echo date('Y-m-d H:i', $lastQuarter); </code></pre> <p>Try to figure out what my code is doing. Especially learn how to use the <a href="http://php.net/modulo" rel="nofollow">modulo</a> operator since it's very useful for a large set of numeric problems!</p>