I am trying to convert 1355657846 and 1355677646 unix timestamp to Y-M-D H:i:s format. The problem is in H:i:s . It should be 11:37:24 and 17:07:26 respectively but it is showing 12:37:24 and 18:07:26.
<?php
echo date('Y-m-d H:i:s','1355657846');//2012-12-16 12:37:26,must be 11:37:26
echo date('Y-m-d H:i:s','1355677646');//2012-12-16 18:07:26,must be 17:07:26
?>
It should be 11:37 and 17:07 because I checked it in unix timestamp conversion
and also it is the time I had received mail in gmail account. And I got these unix timestamp from gmail( using php imap function...$overview->udate)
I am testing this on local xampp server. Can anyone suggest me where I am going wrong here?
PS: I checked related question in stackoverflow, but here I want to convert timestamp to datetime, which I think should be constant irrespective of timezone.