Skip to content

Commit 3b18768

Browse files
authored
Merge pull request #45 from alexdebril/issue/44
Close #44
2 parents 1e5a1fb + 7308ae5 commit 3b18768

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/FeedIo/Rule/DateTimeBuilder.php

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class DateTimeBuilder
2525
'Y-m-d\TH:i:s.uP',
2626
'Y-m-d',
2727
'd/m/Y',
28+
'D, d M Y H:i O',
29+
'D, d M Y H:i:s O',
30+
'D M d Y H:i:s e',
2831
];
2932

3033
/**
@@ -100,6 +103,7 @@ public function guessDateFormat($date)
100103
*/
101104
public function convertToDateTime($string)
102105
{
106+
$string = trim($string);
103107
foreach ([$this->getLastGuessedFormat(), $this->guessDateFormat($string) ] as $format) {
104108
$date = \DateTime::createFromFormat($format, $string);
105109
if ($date instanceof \DateTime) {

0 commit comments

Comments
 (0)