Add Temporal::utc() shorthand to Temporal::convert()

This commit is contained in:
Hypolite Petovan 2018-01-26 07:30:06 -05:00
parent e4f32f8ac8
commit cbc89d147d
5 changed files with 16 additions and 16 deletions

View 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"];