Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed getting of dates in Česká televize Bridge #4483

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed getting of dates in Česká televize Bridge
kolarcz committed Mar 20, 2025
commit 9024dfd61af6e7c0b0780ddaa7623b5ae5580e91
4 changes: 2 additions & 2 deletions bridges/CeskaTelevizeBridge.php
Original file line number Diff line number Diff line change
@@ -58,11 +58,11 @@ private function getUploadTimeFromString($string)
return strtotime('today');
} elseif (strpos($string, 'včera') !== false) {
return strtotime('yesterday');
} elseif (!preg_match('/(\d+).\s(\d+).(\s(\d+))?/', $string, $match)) {
} elseif (!preg_match('/(\d+).\s(\d+).(\s(\d+))?/u', $string, $match)) {
returnServerError('Could not get date from Česká televize string');
}

$date = sprintf('%04d-%02d-%02d', $match[3] ?? date('Y'), $match[2], $match[1]);
$date = sprintf('%04d-%02d-%02d', $match[4] ?? date('Y'), $match[2], $match[1]);
return strtotime($date);
}