Use the example which comes directly from the manual, with one minor modification. You need to seed the random number generator then specify the range of possible values mt_rand() can generate (this is also discussed in the docs).
<?php
function make_seed() {
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);
}
mt_srand(make_seed());
$randval = mt_rand(0,mktime());
echo "The randomly generated date is: " . date("Y-m-d H:i:s", $randval);
?>
Setting the max. of the randval range with mktime() ensures that your generated timestamp is for a date/time that has already occurred (ie. not in the future). Modify the mt_rand() range accordingly to limit the possible time (remember to use valid timestamp values though).
-geoff