title: What is the easiest way to check if time is set in datetime variable
body: <p>I have function one of the arguments of which is <code>$date</code> variable.</p>
  
  <p>Sometimes there is time in the date (like <code>2018-01-01 15:40:43</code>), </p>
  
  <p>sometimes - there is not (like <code>2018-01-01</code>).</p>
  
  <p>I want to know if time is set.
  What is the easiest way to do it?</p>
  
  <p>Here is what I tryied:</p>
  
  <pre><code>function checkDate ($date) {
     $time = date("H:i:s", strtotime($date));
     if ($time == '00:00:00') {
         //time was not set!
     }
  }
  </code></pre>
  
  <p>Obviously, this works, but untill something like <code>2018-06-01 00:00:00</code> is passed.</p>
  
  <p>I would not like using <code>explode</code> of string if there is some other solution.</p>
  
  <p>Thank you/.</p>