Skip to content

Commit 932f20d

Browse files
authored
fixed date with time in LuftfahrtBundesAmtBridge (#3987)
1 parent e65155f commit 932f20d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bridges/LuftfahrtBundesAmtBridge.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ protected function provideFeedIcon(\DOMXPath $xpath)
2626
protected function formatItemTimestamp($value)
2727
{
2828
$value = trim($value);
29-
$dti = DateTimeImmutable::createFromFormat('d.m.Y', $value);
30-
$dti = $dti->setTime(0, 0, 0);
29+
if (strpos($value, 'Uhr') !== false) {
30+
$value = str_replace(' Uhr', '', $value);
31+
$dti = DateTimeImmutable::createFromFormat('d.m.Y G:i', $value);
32+
} else {
33+
$dti = DateTimeImmutable::createFromFormat('d.m.Y', $value);
34+
$dti = $dti->setTime(0, 0);
35+
}
3136
return $dti->getTimestamp();
3237
}
3338

0 commit comments

Comments
 (0)