title: Converting windows timezone to equivalent for PHP settings
body: <p>I am developing an application consisting of a web server using PHP and MySQL running on Windows that the user accesses through a web browser set to <code>http://localhost</code>. But I want it to work in all United States time zones, including most of the State of Arizona that does not observe daylight saving time. To configure this script, I need to make PHP use the same time zone as Windows.</p>
  
  <p>I have a PHP script that gets the timezone from command line on Windows.  The results then need to be converted to the equivalent timezone in <a href="http://php.net/manual/en/timezones.america.php" rel="nofollow noreferrer">PHP's list</a>.</p>
  
  <p>Unfortunately I do not see a straightforward way to do this.  Here is the script: 
      <pre><code>
         $comp_timezone = exec('systeminfo | findstr  /C:"Time Zone"');<br>
         // results are: "Time Zone: (UTC-07:00) Arizona"<br>
         date_default_timezone_set($comp_timezone); 
      </pre></code>
  What I need to do is convert the string result from <code>$comp_timezone</code> into something that the function <code>date_default_timezone_set</code> can use, but as the above example demonstrates, Arizona does not exist as a timezone for php, the closest one would be <code>America/Phoenix</code>.   </p>
  
  <p>So how do I convert a <code>systeminfo</code> timezone to a PHP one?</p>