Can I set PHP's Interal Date and Time to months before?
I am wondering if I can change PHP's overall date, to think its really at about 2 months ago, or 2011 if I want.
If it's "No, you must use the DateTime class and set the system up to run through there", that would be the chosen answer.
The reason is because I have a massive project using an API thats based on many schedules.
You can do that by setting the system date, however you really shouldn't.
Just use PHP's datetime and adjust accordingly. If you don't want to set the month everytime you want to use datetime functions simply create a wrapper class which does this for you and call that.
PHP5 provides DateTime and DateInterval
2 months ago from now:
$date = new DateTime(); // Time now $date->sub(new DateInterval('P2M')); // Substract a Period (P) of Two (2) Months (M)