]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Mail.php
Merge pull request #4387 from MrPetovan/task/3878-move-datetime-to-src
[friendica.git] / src / Model / Mail.php
index 701cf3ad956f7dbba3e27772fc3505ead448d8f0..b2e9e1a48734770b4b2ec5a0b9fcf05287eb0eda 100644 (file)
@@ -10,11 +10,10 @@ use Friendica\Core\System;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
 use Friendica\Network\Probe;
-use Friendica\Util\Temporal;
+use Friendica\Util\DateTimeFormat;
 use dba;
 
 require_once 'include/dba.php';
-require_once 'include/datetime.php';
 
 /**
  * Class to handle private messages
@@ -82,7 +81,7 @@ class Mail
                        $handles = $recip_handle . ';' . $sender_handle;
 
                        $fields = ['uid' => local_user(), 'guid' => $conv_guid, 'creator' => $sender_handle,
-                               'created' => Temporal::convert(), 'updated' => Temporal::convert(),
+                               'created' => DateTimeFormat::utcNow(), 'updated' => DateTimeFormat::utcNow(),
                                'subject' => $subject, 'recips' => $handles];
                        if (dba::insert('conv', $fields)) {
                                $convid = dba::lastInsertId();
@@ -116,7 +115,7 @@ class Mail
                                'replied' => 0,
                                'uri' => $uri,
                                'parent-uri' => $replyto,
-                               'created' => Temporal::convert()
+                               'created' => DateTimeFormat::utcNow()
                        ]
                );
 
@@ -196,7 +195,7 @@ class Mail
 
                $convid = null;
                $fields = ['uid' => $recipient['uid'], 'guid' => $conv_guid, 'creator' => $sender_handle,
-                       'created' => Temporal::convert(), 'updated' => Temporal::convert(),
+                       'created' => DateTimeFormat::utcNow(), 'updated' => DateTimeFormat::utcNow(),
                        'subject' => $subject, 'recips' => $handles];
                if (dba::insert('conv', $fields)) {
                        $convid = dba::lastInsertId();
@@ -224,7 +223,7 @@ class Mail
                                'replied' => 0,
                                'uri' => $uri,
                                'parent-uri' => $replyto,
-                               'created' => Temporal::convert(),
+                               'created' => DateTimeFormat::utcNow(),
                                'unknown' => 1
                        ]
                );