Friendica workaround

merge-requests/5/head
Terence Eden 2024-03-18 07:51:42 +00:00
rodzic d829c201f2
commit 7f2cd763d0
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -1522,11 +1522,12 @@ HTML;
} }
// Is there a significant difference between the Date header and the published timestamp? // Is there a significant difference between the Date header and the published timestamp?
// Two minutes chosen because Friendica is frequently more than a minute skewed
$published = $body["published"]; $published = $body["published"];
$publishedDatetime = new DateTime($published); $publishedDatetime = new DateTime($published);
// Calculate the time difference in seconds // Calculate the time difference in seconds
$timeDifference = abs( $publishedDatetime->getTimestamp() - $headerDatetime->getTimestamp() ); $timeDifference = abs( $publishedDatetime->getTimestamp() - $headerDatetime->getTimestamp() );
if ( $timeDifference > 60 ) { if ( $timeDifference > 120 ) {
// Write a log detailing the error // Write a log detailing the error
// Filename for the log // Filename for the log
$filename = "{$timestamp}.{$type}.Signature.Time_Failure.txt"; $filename = "{$timestamp}.{$type}.Signature.Time_Failure.txt";