mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-22 01:25:28 +03:00
fixed date with time in LuftfahrtBundesAmtBridge (#3987)
This commit is contained in:
parent
e65155f440
commit
932f20d434
1 changed files with 7 additions and 2 deletions
|
@ -26,8 +26,13 @@ class LuftfahrtBundesAmtBridge extends XPathAbstract
|
|||
protected function formatItemTimestamp($value)
|
||||
{
|
||||
$value = trim($value);
|
||||
$dti = DateTimeImmutable::createFromFormat('d.m.Y', $value);
|
||||
$dti = $dti->setTime(0, 0, 0);
|
||||
if (strpos($value, 'Uhr') !== false) {
|
||||
$value = str_replace(' Uhr', '', $value);
|
||||
$dti = DateTimeImmutable::createFromFormat('d.m.Y G:i', $value);
|
||||
} else {
|
||||
$dti = DateTimeImmutable::createFromFormat('d.m.Y', $value);
|
||||
$dti = $dti->setTime(0, 0);
|
||||
}
|
||||
return $dti->getTimestamp();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue