title: Get correct timezone name from time format yyyy-mm-ddThh:mm:ss.s+zzzzzz
body: <p>I am working with an api that returns time in an iso standard (<code>yyyy-mm-ddThh:mm:ss.s+zzzzzz</code>)
      Where:</p>
  
  <pre><code>yyyy is the year
  
  mm (first) is the month
  
  dd is the day
  
  T is a separator indicating that time-of-day follows
  
  hh is the hour on a 24-hour clock
  
  mm (second) is the minute
  
  ss is whole seconds
  
  s (optional) is the fractional second
  
  zzzzzz is the time zone
  </code></pre>
  
  <blockquote>
    <p>eg 2015-07-31T13:00:00.000+03:00</p>
  </blockquote>
  
  <p>I would like to get the correct timezone from <code>+03:00</code></p>
  
  <p>What i have tried based from other solutions here on stackoverflow:</p>
  
  <pre><code>$date = new DateTime('2015-07-31T13:00:00.000+03:00');
  $newtz = date_timezone_get($date);
  $offset= timezone_name_get($newtz);
  $timezone = preg_replace('/[^0-9]/', '', $offset) * 36;
  $timezone_name = timezone_name_from_abbr('', $offset, true);
  echo $timezone_name;
  </code></pre>
  
  <p>The above code outputs: <code>Europe/Helsinki</code> but i am expecting <code>Africa/Nairobi</code></p>
  
  <p>Question is how do I make the code output <code>Africa/Nairobi</code>?</p>
  
  <p>Also what about where there exists two timezones with the same offset eg:
  <code>Europe/Minsk</code> and <code>Africa/Nairobi</code> have offsets of <code>+03:00</code></p>