I am trying to get a timestamp for both the current New York and London date/time.
date_default_timezone_set('America/New_York');
$dtNY = new DateTime();
echo 'New York';
echo date('m-d-Y H:i:s', $dtNY->getTimestamp());
echo $dtNY->getTimestamp();
echo 'London';
date_default_timezone_set('Europe/London');
$dtLondon = new DateTime();
echo date('m-d-Y H:i:s', $dtLondon->getTimestamp());
echo $dtLondon->getTimestamp();
The result of above code is
New York 03-30-2012 08:32:49 1333110769
London 03-30-2012 13:32:49 1333110769
Why does above code give me totally identical timestamps but different dates?!? this is not logical :-s