Page 1 of 1

web server date and my date!

Posted: Wed Mar 25, 2009 4:15 am
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?

Re: web server date and my date!

Posted: Wed Mar 25, 2009 4:30 am
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();
// }