Page 1 of 1

GMT for new leads generated by manual calls

PostPosted: Wed Jul 26, 2017 7:29 am
by airflux
Hi guys,
I've configured UTC datetime on server bios, timezone on OS, GMT on admin>servers, admin>phones, admin>system settings as +1.
Datetime is fine in every page and in every db record, except for the customer time on the agent screen when the agent create new lead doing manual call to a new phone number (not in list).
This appens on all our Vicidial version.

Old leads are fine thanks to this script
### adjust the GMT offset for the leads in the vicidial_list table
1 1,7 * * * /usr/share/astguiclient/ADMIN_adjust_GMTnow_on_leads.pl --debug --list-settings
then in vicidial_list table all leads will have gmt_offset_now = +2 (due to dst) after that

But when new leads are inserted in vicidial_list table with the query @vdc_db_query.php due to manual call
Code: Select all
if ($lookup_empty_insert_lead > 0)
            {
            ### insert a new lead in the system with this phone number
            $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate',last_local_call_time='$NOW_TIME',vendor_lead_code=\"$vendor_lead_code\";";
            if ($DB) {echo "$stmt\n";}
            $rslt=mysql_to_mysqli($stmt, $link);
               if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00022',$user,$server_ip,$session_name,$one_mysql_log);}
            $affected_rows = mysqli_affected_rows($link);
            $lead_id = mysqli_insert_id($link);
            $CBleadIDset=1;
            }
         }


the gmt_offset_now field is 0.00 because is the default value on the table and is not specified in the insert query.

So.. there is a way to force the gmt_offset_now on new leads? I'm missing something in configuration? Or I need to edit the insert query to add it?

Re: GMT for new leads generated by manual calls

PostPosted: Wed Jul 26, 2017 9:01 am
by mflorell
You could edit the insert query, or alter the table to use a different default value for that field.