Friendica workaround
rodzic
d829c201f2
commit
7f2cd763d0
|
@ -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";
|
||||||
|
|
Ładowanie…
Reference in New Issue