Browse Source

Fix: properly parse dates in synchro import. Thanks to Karl aka karkoff1212 for reporting the issue.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4179 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 9 years ago
parent
commit
d65256fcba
1 changed files with 2 additions and 2 deletions
  1. 2 2
      synchro/synchro_import.php

+ 2 - 2
synchro/synchro_import.php

@@ -225,8 +225,8 @@ function ChangeDateFormat($sProposedDate, $sFormat)
 	}
 	else
 	{
-		$oDate = DateTime::createFromFormat($sDateFormat, $sProposedDate);
-		if ($oDate !== false)
+		$oDate = $oFormat->Parse($sProposedDate);
+		if ($oDate !== null)
 		{
 			$sDate = $oDate->format(AttributeDateTime::GetInternalFormat());
 			return $sDate;