From: Hypolite Petovan Date: Sun, 4 Feb 2018 01:44:19 +0000 (-0500) Subject: Replace forgotten datetime_convert() instances X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4050a7b8dc5618bb4e6754f80f3269716ffb1c4f;p=friendica.git Replace forgotten datetime_convert() instances --- diff --git a/src/Model/Contact.php b/src/Model/Contact.php index e57bcd99d4..1d31c6cb5b 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1388,7 +1388,7 @@ class Contact extends BaseObject `blocked`, `readonly`, `pending`, `writable`) VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 1, 1)", intval($importer['uid']), - dbesc(datetime_convert()), + dbesc(DateTimeFormat::utcNow()), dbesc($url), dbesc(normalise_link($url)), dbesc($name), @@ -1418,7 +1418,7 @@ class Contact extends BaseObject if (is_array($contact_record)) { dba::insert('intro', ['uid' => $importer['uid'], 'contact-id' => $contact_record['id'], 'blocked' => false, 'knowyou' => false, - 'hash' => $hash, 'datetime' => datetime_convert()]); + 'hash' => $hash, 'datetime' => DateTimeFormat::utcNow()]); } Group::addMember(User::getDefaultGroup($importer['uid'], $contact_record["network"]), $contact_record['id']); diff --git a/src/Util/DateTimeFormat.php b/src/Util/DateTimeFormat.php index 10810da034..b039ff80a1 100644 --- a/src/Util/DateTimeFormat.php +++ b/src/Util/DateTimeFormat.php @@ -122,7 +122,7 @@ class DateTimeFormat try { $d = new DateTime($s, $from_obj); } catch (Exception $e) { - logger('datetime_convert: exception: ' . $e->getMessage()); + logger('DateTimeFormat::convert: exception: ' . $e->getMessage()); $d = new DateTime('now', $from_obj); }