Ive found a bug in my helpdesk which i need help with.
I changed the system date format to UK DD/MM/YY and also on the calander.js ive got it on the ADVANCED TICKET SEARCH to input into the Startdate and EndDate in this UK format, but the search is still relying on the US Style MM/DD/YY so the search is not working, this PHO code below looks to be the part where this is done, but need to add D-M-Y so the search understands that the inputting Start and End dates are UK format and not US.
Can anyone help fixing the date formatting of the search to understand that what is entered is DD/MM/YY and not MM//DD/YY
What i ultimately want to do once this is working, is have a tick box next to the search dates which says the Start Date and End Date search entries are the CLOSED date instead instead of the OPEN date range. So if box is checked the range entered is searching for closed date of the tickets and not the default of OPEN.
Can anyone help with that also ?
Cheers
//dates
$startTime =($_REQUEST && (strlen($_REQUEST)>=8))?strtotime($_REQUEST);
$endTime =($_REQUEST && (strlen($_REQUEST)>=8))?strtotime($_REQUEST);
if( ($startTime && $startTime>time()) or ($startTime>$endTime && $endTime>0)){
$errors='Entered date span is invalid. Selection ignored.';
$startTime=$endTime=0;
}else{
//Have fun with dates.
if($startTime){
$qwhere.=' AND ticket.created>=FROM_UNIXTIME('.$startTime.')';
$qstr.='&startDate='.urlencode($_REQUEST);
}
if($endTime){
$qwhere.=' AND ticket.created<=FROM_UNIXTIME('.$endTime.')';
$qstr.='&endDate='.urlencode($_REQUEST);
}