Date and time in 24 hours format : <p>I have a date in this format <code>Fri, 15 Jan 2016 15:14:10 +0800</code>, and I want to display time like this <code>2016-01-15 15:14:10</code>.</p>

<p>What I tried is:</p>

<pre><code>$test = 'Fri, 15 Jan 2016 15:14:10 +0800';
$t = date('Y-m-d G:i:s',strtotime($test));
echo $t;
</code></pre>

<p>But it is displaying date in this format: <code>2016-01-15 7:14:10</code>, it should be <code>2016-01-15 15:14:10</code>.</p>

<p>How can i do this?</p>
