web server date and my date!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rwahdan
Forum Newbie
Posts: 23
Joined: Thu Feb 12, 2009 1:49 am

web server date and my date!

Post by rwahdan »

dear all,

i am testing some code and it depends on the day. today is wednesday and i have some code that i want to test but the problem is, i have to wait until tomorrow "thursday" to actually check if my code is working! is there a way to make in php that the current date is thursday?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: web server date and my date!

Post by requinix »

You fiddle with your code to make it think it's Thursday, or to not even check the date at all.

Code: Select all

// if ($today_is_thursday) {
    do_stuff();
// }
Post Reply