PHP date showing wrong time despite the timestamp being correct

That time stamp is is 9am GMT timezone, if you are in another timezone then you will need to adjust it accordingly.

http://php.net/manual/en/function.date-default-timezone-set.php

  date_default_timezone_set('Europe/London');

or even better in your php.ini

http://php.net/manual/en/datetime.configuration.php

date.timezone="Europe/London"

Or you can use more specifically GMT instead of Europe/London (which has DST)


try this method will work

for time zone http://php.net/manual/en/timezones.php

code

<?php
date_default_timezone_set('Asia/Kolkata'); 

$dt2=date("Y-m-d H:i:s");
echo $dt2;

?>

try this

// set default timezone
date_default_timezone_set('UTC');
//define unix timestamp
$timestamp = 1456778973;
// output
echo date('d M Y H:i:s',$timestamp);

Try this converter too http://freeonlinetools24.com/