Skip to content
Snippets Groups Projects
Unverified Commit c7e9b07c authored by Monish Deb's avatar Monish Deb Committed by GitHub
Browse files

Merge pull request #23708 from eileenmcnaughton/date

#2325 Fix handling of seconds on import
parents ed4c0b29 110eeb34
No related branches found
No related tags found
No related merge requests found
......@@ -2125,7 +2125,7 @@ class CRM_Utils_Date {
$ruleName = 'date';
if ($dateType == 1) {
$matches = [];
if (preg_match("/(\s(([01]\d)|[2][0-3]):([0-5]\d))$/", $date, $matches)) {
if (preg_match("/(\s(([01]\d)|[2][0-3]):([0-5]\d):?[0-5]?\d?)$/", $date, $matches)) {
$ruleName = 'dateTime';
if (strpos($date, '-') !== FALSE) {
$dateVal .= array_shift($matches);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment