title: Want to convert GMT date time to IST Date Time
body: <p>i want to convert GMT date time to IST Date Time for that purpose i have tried below code but not getting desired result. </p>
  
  <pre><code>function ConvertGMTToLocalTimezone($gmttime,$timezoneRequired)
      {
          $system_timezone = date_default_timezone_get();
  
          date_default_timezone_set("GMT");
          $gmt = date("Y-m-d h:i:s A");
  
          $local_timezone = $timezoneRequired;
          date_default_timezone_set($local_timezone);
          $local = date("Y-m-d h:i:s A");
  
          date_default_timezone_set($system_timezone);
          $diff = (strtotime($local) - strtotime($gmt));
  
          $date = new DateTime($gmttime);
          $date-&gt;modify("+$diff seconds");
          $timestamp = $date-&gt;format("m-d-Y H:i:s");
          return $timestamp;
      }
  
  $ISTtime=ConvertGMTToLocalTimezone('Tue, 17 Dec 2013 07:23:56 +0000','Asia/Calcutta');
  echo $ISTtime;
  </code></pre>
  
  <p><strong>Result: 12-17-2013 18:34:02</strong></p>
  
  <p>What i am doing wrong?</p>