title: Date and Summer Time
body: <p>I've been notified that something I've written isn't working (and potentially hasn't been for a few months if what I think is the problem is actually the problem...!)</p>
  
  <p>I'm based in the UK, so work with GMT / BST</p>
  
  <p>I'm getting the date and hour and then running a SQL function to perform an update based on the results, so my code is something along the lines of...</p>
  
  <pre><code>$day = date("j M Y", mktime());
  
  $hour = date('H',time());
  $hourend = $hour + 1;
  
  $from = $day . " " . $hour . ":00:00";
  $to = $day . " " . $hour . ":59:59";
  </code></pre>
  
  <p>And then a SQL query to get the results for the update:</p>
  
  <pre><code>select username, dms from MISYearToDate('$from', '$to')
  </code></pre>
  
  <p>So, will I need to change the $hour based on whether or not we are in daylight savings?</p>
  
  <p>e.g. </p>
  
  <pre><code>$isBST = date("I", $day);
  IF ($isBST == 1) 
  {
   $hour = $hour + 1;
  } 
  </code></pre>
  
  <p>Or will is do this for me automatically?</p>