tomorrow date()??

They have: 164 posts

Joined: Nov 2001

we use date() to get today's date, how to get tomorrow's date?

and another thing is, the date() gets the date from ur computer date izzit?? wat if the computer's date is wrong, then will the date() be wrong also??

He has: 1,016 posts

Joined: May 2002

Please referr to Example 3 on http://www.php.net/date (PHP Manual) for code to get tomorrow's date.

The date() function gets the date from the computer/server it is executed on. If the date is incorrect on that computer/server, then the date displayed will also be incorrect.

Busy's picture

He has: 6,151 posts

Joined: May 2001

Javascript should be used for dates/time etc as it's run off the viewers pc not the servers pc.

Being in NZ I'm always seeing the wrong date and time around web sites, and when you try buy something it can really mess things up.
Even this forum I can't get the time right, except when outside of daylight savings time.

They have: 164 posts

Joined: Nov 2001

how can we make sure tat the date() follow the server instead of user computer??

He has: 1,016 posts

Joined: May 2002

Use PHP.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

I'm thinking this off the top of my head. Would it not be possible to get a timestamp in seconds and add on 24*3600, then convert the new timestamp back to a date?

He has: 1,016 posts

Joined: May 2002

Yes, you could.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.