 <p>Calling <code>strtotime("4pm")</code> will give you the time for today at 4pm. If it's already past 4pm, you can just add <code>60*60*24</code> to the given timestamp</p> <pre><code>// Example blatantly copied from AndrewR, but it uses strtotime $nextfourpm = strtotime("4pm"); if ($nextfourpm &lt; time()) { $nextfourpm += 60*60*24; } </code></pre>