namespace Friendica\Model;
use Friendica\BaseObject;
+use Friendica\Util\DateTimeFormat;
use dba;
require_once 'include/dba.php';
*/
public static function insert($command, $pid = null)
{
+ $return = true;
+
+ if (is_null($pid)) {
+ $pid = getmypid();
+ }
+
dba::transaction();
- if (!dba::exists('process', ['pid' => getmypid()])) {
- $return = dba::insert('process', ['pid' => $pid, 'command' => $command, 'created' => datetime_convert()]);
+ if (!dba::exists('process', ['pid' => $pid])) {
+ $return = dba::insert('process', ['pid' => $pid, 'command' => $command, 'created' => DateTimeFormat::utcNow()]);
}
dba::commit();