title: Setting a Php Cookies timer to expire after 24hr
body: <p>I have created a PHP function which technically should expire/reset after 24hrs. PHP seems to store cache which so what hinders the cookies timer.</p>
  
  <p>Below is a snippet of my code, which is essentially a cookie timer. When the users presses the 'close-reveal-modal' class the cookie popup does not appear for 24hr.</p>
  
  <pre><code>if( !isset($_COOKIE["saw-popup"]) &amp;&amp; $_COOKIE["saw-popup"] != "true") {
      $one_day_in_seconds = 60*60*24;
      setcookie("saw-popup", "true", time() + $one_day_in_seconds);
  
      if (is_front_page()) {
          get_template_part('partials/modal', 'homepage-newsletter-signup');
      }
  }
  </code></pre>
  
  <p>Is there anything I can add to this function to ensure the timer correctly resets after a 24hr period?</p>