mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
Adjust rng time set
This commit is contained in:
parent
d912319d89
commit
f92cc00eac
|
|
@ -39,6 +39,8 @@ class DateTime
|
|||
*/
|
||||
public static function generateDateTime(\DateTime $start, \DateTime $end) : \DateTime
|
||||
{
|
||||
return new \DateTime(date('Y-m-d H:i:s', mt_rand($start->getTimestamp(), $end->getTimestamp())));
|
||||
$rng = new \DateTime();
|
||||
|
||||
return $rng->setTimestamp(mt_rand($start->getTimestamp(), $end->getTimestamp()));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user