Why the following two will get same Result??
echo date('d/m/Y',1338156000); will produce output 28/05/2012
And echo date('d/m/Y',1338143400); also produce the same out put 28/05/2012 ??
Quite Simple
<?php
echo date('d/m/Y',1338156000);
echo "<br />";
echo date('d/m/Y',1338143400);
echo "<br />";
echo date('d/m/Y H:i:s',1338156000);
echo "<br />";
echo date('d/m/Y H:i:s',1338143400);
echo "<br />";
?>
Here, when 27/05/2012 22:00:00 the day is: 27
and when 27/05/2012 18:30:00 the day is: 27
Yes Both will give the same date because time stamp is in seconds.if you print first like
echo date("d/m/y h:i:s", 1338156000);
it will give you result like
28/05/2012 03:30:00
and
echo date('d/m/Y h:i:s',1338143400);
result is
28/05/2012 12:00:00
for further reference check php date and time manual
28/05/2012and27/05/2012