title: php report-Strict Standards: mktime(): You should be using the time() function instead
body: <p>I have a PHP report that is using a date variable to return results from the MySQL database.</p>
  
  <p>I did not write the report an it uses <code>mktime</code> and I have recently moved to a new server with the latest version of php and i now get</p>
  
  <p>This the date variable creation:</p>
  
  <pre><code>$start_date  = mktime(0,0,0,$StartMonth,$StartDay,$StartYear);
  $end_date    = mktime(23,59,59,$EndMonth,$EndDay,$EndYear);
  </code></pre>
  
  <p>And later to get the date:</p>
  
  <pre><code>if ($HTTP_SERVER_VARS['REQUEST_METHOD'] == "POST") {
      if ($prefix == "Start") {
              $currYear = $StartYear;
              $currMonth = $StartMonth;
              $currDay = $StartDay;
      }
      elseif ($prefix == "End") {
              $currYear = $EndYear;
              $currMonth = $EndMonth;
              $currDay = $EndDay;
      }
  }
  else {
      $arr = getdate(mktime());
      $currYear = $arr["year"];
      $currMonth = $arr["mon"];
  
      // If the user hasn't chosen a date, 
      // set the beginning day at the first of the month
      if ($prefix == "Start")
              $currDay = 01;
      else
              $currDay = $arr["mday"];
  }
  </code></pre>
  
  <p>When I run the report now I get <code>Strict Standards: mktime(): You should be using the time() function instead</code></p>
  
  <p>I have changed it to <code>$arr = getdate(time());</code> and it gets rid of the error but now the date picker does not work.</p>