X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FDate.php;h=a08e6b7d680fabd8b150cc59c2f79a29c678e9ee;hb=594dc7f40980a8dc9d60fe3b4dfd3c61ceec6c30;hp=1bdabb2b60114330378b0ab278a3eb2719e876f4;hpb=e6229d5aa0bca599fe85ca0a624d86ad14cfb8e1;p=civicrm-core.git diff --git a/CRM/Utils/Date.php b/CRM/Utils/Date.php index 1bdabb2b60..a08e6b7d68 100644 --- a/CRM/Utils/Date.php +++ b/CRM/Utils/Date.php @@ -369,7 +369,7 @@ class CRM_Utils_Date { $hour24 = (int) substr($dateString, 11, 2); $minute = (int) substr($dateString, 14, 2); - $second = (int) substr($dateString, 16, 2); + $second = (int) substr($dateString, 17, 2); } else { $year = (int) substr($dateString, 0, 4); @@ -433,6 +433,7 @@ class CRM_Utils_Date { '%A' => $type, '%Y' => $year, '%s' => str_pad($second, 2, 0, STR_PAD_LEFT), + '%S' => str_pad($second, 2, 0, STR_PAD_LEFT), ]; return strtr($format, $date);