Commands And Dates


I’m writing a command to be run as cron.

It is very simple, but when I try to user the php DateTime class i get an error with the auto load.


$currentDate = new DataTime();


PHP Error[2]: include(DataTime.php): failed to open stream: No such file or directory


Figured it out:

Used procedural method instead of object.

$currentDate = date_create();

You got the class name wrong, it’s DateTime not DataTime.

Thanks - Long day - should have proof read better