title: How do I get midnight of current day in a specified timezone in PHP?
body: <p>I have a server in New York, and a "client" in California which expects that server to figure out midnight of the current day in California, which is not the same as New York's for three hours out of the day.</p>
  
  <p>I have only been able to calculate midnight for the current day as is seen by New York, but I need to be able to calculate midnight of the current day for California (or any other arbitrary timezone)</p>
  
  <p>I do have access to the timezone's offset from UTC.</p>
  
  <pre><code>$tzOffset = "-700"; // Timezone offset from UTC (in this case, PDT)
  </code></pre>
  
  <p>The (semi-working) method that I'm using right now is</p>
  
  <pre><code>strtotime("00:00:00 " . $tzOffset);
  </code></pre>
  
  <p>On Jun 25 at 10:00 PM PDT, this method is returning Jun 26 at 12:00 AM PDT as midnight, when it should be returning Jun 25 12:00 AM PDT.</p>