title: How to get right datetime of specific country in php
body: <p>Hello I am in need of saving time when user get register. I am trying code in PHP for generating India specific time.</p>
  
  <pre><code> $timezone = new DateTimeZone("Asia/Kolkata" );
          $date = new DateTime();
          $date-&gt;setTimezone($timezone );
          $dtobj = $date-&gt;format('Y-m-d H:i:s');
  echo $dtobj;
  </code></pre>
  
  <p>it is working but not showing correct time. I am using Godaddy server.
  Time given by code is 2014-01-13 10:21:29 but actual time is 2014-01-13 02:20:55. I search on Google and tried almost all function but getting same difference. What should i do for getting exact time.</p>