namespace Friendica\Model;
use Friendica\BaseObject;
+use Friendica\Util\DateTimeFormat;
use dba;
require_once 'include/dba.php';
-require_once 'include/datetime.php';
/**
* @brief functions for interacting with a process
{
$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();