]> git.mxchange.org Git - friendica-addons.git/blobdiff - twitter/twitter.php
Add Temporal::utc() shorthand to Temporal::convert()
[friendica-addons.git] / twitter / twitter.php
index cc12e8de8448dad7a223358b27fde337e35e6400..0bffa4eb11ab895487c40a3ba005789a35a5da11 100644 (file)
@@ -1070,7 +1070,7 @@ function twitter_fetch_contact($uid, $contact, $create_user)
        } else {
                // update profile photos once every two weeks as we have no notification of when they change.
                //$update_photo = (($r[0]['avatar-date'] < Temporal::convert('now -2 days', '', '', )) ? true : false);
-               $update_photo = ($r[0]['avatar-date'] < Temporal::convert('now -12 hours'));
+               $update_photo = ($r[0]['avatar-date'] < Temporal::utc('now -12 hours'));
 
                // check that we have all the photos, this has been known to fail on occasion
                if ((!$r[0]['photo']) || (!$r[0]['thumb']) || (!$r[0]['micro']) || ($update_photo)) {
@@ -1490,8 +1490,8 @@ function twitter_createpost(App $a, $uid, $post, $self, $create_user, $only_exis
        $converted = twitter_expand_entities($a, $postarray['body'], $post, false, $picture);
        $postarray['body'] = $converted["body"];
        $postarray['tag'] = $converted["tags"];
-       $postarray['created'] = Temporal::convert($post->created_at);
-       $postarray['edited'] = Temporal::convert($post->created_at);
+       $postarray['created'] = Temporal::utc($post->created_at);
+       $postarray['edited'] = Temporal::utc($post->created_at);
 
        $statustext = $converted["plain"];