Skip to content
Snippets Groups Projects
Commit ead43743 authored by Prasad's avatar Prasad
Browse files

Merge branch '158815700' into 'master'

Fixes: Handled the formating date to string when date comes in format dd/mm/yyyy

See merge request !1122
parents 0af5c8d0 e32448d5
No related branches found
No related tags found
1 merge request!1122Fixes: Handled the formating date to string when date comes in format dd/mm/yyyy
......@@ -284,6 +284,13 @@ class Vtiger_Util_Helper {
*/
if ($currentUser->get('date_format') === 'mm-dd-yyyy') {
$dateInUserFormat = str_replace('-', '/', $dateInUserFormat);
} else if ($currentUser->get('date_format') === 'dd/mm/yyyy'){
// strtotime expects the format m/d/y making changes to its convenient
$dateArray = explode('/', $dateInUserFormat);
$temp = $dateArray[0];
$dateArray[0] = $dateArray[1];
$dateArray[1] = $temp;
$dateInUserFormat = implode('/', $dateArray);
}
$date = strtotime($dateInUserFormat);
......
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