Page 1 of 1

getting wrong timestamp

Posted: Sat Oct 11, 2008 9:11 am
by skachhwaha
Hi,

1224453600 this is a timestamp of 20/10/2008 date, now when i try to add 7 days timestamp in this timestamp it is returning 26/10/2008 date and i m expecting 27/10/2008
echo date('d-m-Y',1224453600+(86400*7));

but when i try to add 2/3/4/5/6 days timestamp then d date is coming correct only problem is coming when i try to add 7days timestamp. :banghead:


below is my system info
System Linux infong 2.4 #1 SMP Tue Dec 18 22:34:10 UTC 2007 i686 GNU/Linux

Re: getting wrong timestamp

Posted: Sat Oct 11, 2008 10:27 am
by arjan.top
1224453600 = Sun, 19 Oct 2008 22:00:00 GMT

Re: getting wrong timestamp

Posted: Sat Oct 11, 2008 10:52 am
by skachhwaha
19/10/2008 is coming at yr computer but on my computer it is giving me 20/10/2008. may be yr locale setting is different

Re: getting wrong timestamp

Posted: Sat Oct 11, 2008 10:53 am
by skachhwaha
arjan.top wrote:1224453600 = Sun, 19 Oct 2008 22:00:00 GMT
19/10/2008 is coming at yr computer but on my computer it is giving me 20/10/2008. may be yr locale setting is different

Re: getting wrong timestamp

Posted: Sat Oct 11, 2008 11:09 am
by arjan.top
its 19 oct in GMT timezone, you are in different timezone so it's 20

what about daylight saving time?ΕΎ

EDIT:
and test is with this:
echo date('c',1224453600+(86400*7));