getting wrong timestamp

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
skachhwaha
Forum Newbie
Posts: 3
Joined: Sat Oct 11, 2008 9:00 am

getting wrong timestamp

Post 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
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: getting wrong timestamp

Post by arjan.top »

1224453600 = Sun, 19 Oct 2008 22:00:00 GMT
skachhwaha
Forum Newbie
Posts: 3
Joined: Sat Oct 11, 2008 9:00 am

Re: getting wrong timestamp

Post 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
skachhwaha
Forum Newbie
Posts: 3
Joined: Sat Oct 11, 2008 9:00 am

Re: getting wrong timestamp

Post 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
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: getting wrong timestamp

Post 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));
Post Reply