title: How to convert Localtime to user seleted timezone in php
body: <p>I want to convert the India time to user selected timezone in php. I used the following php code, but it showing some error </p>
  
  <p><code>Uncaught exception 'Exception' with message 'DateTimeZone::__construct(): Unknown or bad timezone (+13:40)'</code></p>
  
  <p>My php code</p>
  
  <pre><code>$date = new DateTime('2016-10-22 01:39:53 +5:30');
  $date-&gt;setTimezone(new DateTimeZone('+13:40'));
  echo   $date-&gt;format('Y-m-d H:i:s');
  </code></pre>
  
  <p>But this code is working perfectly in phpfiddle.
  <strong>Working link here</strong> <a href="http://phpfiddle.org/main/code/5vi2-r7t9" rel="nofollow">http://phpfiddle.org/main/code/5vi2-r7t9</a></p>