]> git.mxchange.org Git - friendica.git/commitdiff
Improved date time formula thing.
authorMichael <heluecht@pirati.ca>
Thu, 8 Feb 2018 19:33:40 +0000 (19:33 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 8 Feb 2018 19:33:40 +0000 (19:33 +0000)
src/Model/Queue.php

index df8038c0dba1c6a58c1c1872664dd9e65ceff2a6..4a29c8aa4a683bdf4fccf28305769e66901304f4 100644 (file)
@@ -32,7 +32,7 @@ class Queue
 
                // Calculate the delay until the next trial
                $delay = (($retrial + 3) ** 4) + (rand(1, 30) * ($retrial + 1));
-               $next = DateTimeFormat::utc(date('c', time() + $delay));
+               $next = DateTimeFormat::utc('now ' . $delay . ' seconds');
 
                dba::update('queue', ['last' => DateTimeFormat::utcNow(), 'retrial' => $retrial + 1, 'next' => $next], ['id' => $id]);
        }