Fix date in Postman header

This commit is contained in:
Diogo Cordeiro 2018-08-05 20:45:45 +01:00
parent 73d5fa79d7
commit c10585da3f
3 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ if (!defined('GNUSOCIAL')) {
}
// Ensure proper timezone
date_default_timezone_set('UTC');
date_default_timezone_set('GMT');
// Import required files by the plugin
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

View File

@ -55,9 +55,9 @@ class apInboxAction extends ManagedAction
ActivityPubReturn::error('Only POST requests allowed.');
}
common_debug('ActivityPub Shared Inbox: Received a POST request.');
common_debug('ActivityPub Inbox: Received a POST request.');
$data = file_get_contents('php://input');
common_debug('ActivityPub Shared Inbox: Request contents: '.$data);
common_debug('ActivityPub Inbox: Request contents: '.$data);
$data = json_decode(file_get_contents('php://input'), true);
try {

View File

@ -80,7 +80,7 @@ class Activitypub_postman
'content-type' => 'application/activity+json',
'accept' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
'user-agent' => 'GNUSocialBot v0.1 - https://gnu.io/social',
'date' => date('D, d M Y h:i:s') . ' GMT'
'date' => gmdate('D, d M Y H:i:s \G\M\T', time())
];
$handlerStack = GuzzleHttpSignatures::defaultHandlerFromContext($context);