Advertisement
Kalgon

Perfect Minutes and Seconds Timestamp Likelihood Generator

Dec 5th, 2019
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. <head><title>Random Timestamp Generator</title></head>
  2. <body>
  3. <?php
  4. $tstotal=0;
  5. for ($i=0; $i<10000; $i++) {
  6.     $int= mt_rand(1571965200,1575539477); //October 25th, 2019 "launch date" of Team Trees to December 5th, 2019 when script was created.
  7.     $string = date("Y-m-d H:i:s",$int);
  8.     echo $string;
  9.     if(date("i",$int) == "00" && date("s",$int) == "00")
  10.     {
  11.         echo " <b>Exact time!</b>";
  12.         $tstotal++;
  13.     }
  14.     echo "<br/>";
  15. }
  16. echo "<br/>";
  17. echo "Displaying <b>10000</b> random timestamps. Total perfect minute and second timestamps: <b>";
  18. echo strval($tstotal);
  19. echo "</b>";
  20.  
  21. ?>
  22. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement