mirror of
https://github.com/friendica/friendica
synced 2025-04-23 19:10:13 +00:00
Use DateTimeFormat::utc() instead of DBM::date()
This commit is contained in:
parent
c55e389bbc
commit
8ddb94ef06
7 changed files with 15 additions and 12 deletions
|
@ -6,6 +6,7 @@ namespace Friendica\Model;
|
|||
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
||||
require_once "include/dba.php";
|
||||
|
||||
|
@ -27,7 +28,7 @@ class Conversation
|
|||
*/
|
||||
public static function insert($arr) {
|
||||
if (in_array(defaults($arr, 'network', NETWORK_PHANTOM), [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS]) && !empty($arr['uri'])) {
|
||||
$conversation = ['item-uri' => $arr['uri'], 'received' => DBM::date()];
|
||||
$conversation = ['item-uri' => $arr['uri'], 'received' => DateTimeFormat::utcNow()];
|
||||
|
||||
if (isset($arr['parent-uri']) && ($arr['parent-uri'] != $arr['uri'])) {
|
||||
$conversation['reply-to-uri'] = $arr['parent-uri'];
|
||||
|
|
|
@ -815,7 +815,7 @@ class GContact
|
|||
self::fixAlternateContactAddress($contact);
|
||||
|
||||
if (!isset($contact["updated"])) {
|
||||
$contact["updated"] = DBM::date();
|
||||
$contact["updated"] = DateTimeFormat::utcNow();
|
||||
}
|
||||
|
||||
if ($contact["network"] == NETWORK_TWITTER) {
|
||||
|
@ -858,7 +858,7 @@ class GContact
|
|||
logger("Update gcontact for ".$contact["url"], LOGGER_DEBUG);
|
||||
$condition = ['`nurl` = ? AND (`generation` = 0 OR `generation` >= ?)',
|
||||
normalise_link($contact["url"]), $contact["generation"]];
|
||||
$contact["updated"] = DBM::date($contact["updated"]);
|
||||
$contact["updated"] = DateTimeFormat::utc($contact["updated"]);
|
||||
|
||||
$updated = ['photo' => $contact['photo'], 'name' => $contact['name'],
|
||||
'nick' => $contact['nick'], 'addr' => $contact['addr'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue