Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: David on January 01, 1970, 12:00:00 AM

Title: time GMT
Post by: David on January 01, 1970, 12:00:00 AM
Hi all,

I used ICC 6.1 The mails that I receive are recorded in the GCTICS database with the GMT time Zone. How is it possible to record those mails with another time zone.

Thanks
Title: time GMT
Post by: Jorge on January 01, 1970, 12:00:00 AM
Hi David
Which is your ICS Client version?
Jorge
Title: time GMT
Post by: Vivek on January 01, 1970, 12:00:00 AM
I asked the same question to Genesys, they told me that it is hardcoded in the programe (I believe in Media link). Keep that in mind we are still using IS5.1.6. I am in EST.
Title: time GMT
Post by: JimM on January 01, 1970, 12:00:00 AM
I created the following function to convert the GMT to your local time. Note that I'm using Oracle 8.1.7, and am in the central time zone. You will need to convert the timezones for your situation. Also, note that it checks for Daylight savings time. Once again, you may need to adjust:

function convert_gmt(check_date date)
return date is
start_dst date; - date for start of daylight savings time
end_dst date; - date form end of daylight savings time
start_sunday integer; - day of the month for first Sunday in April
end_sunday integer; - day of the month for last Sunday in October
year varchar2(5); - current year
begin
year := to_char(check_date, 'YYYY'); - Get year for the given date.
- compute the date of the first Sunday in April for the given year.
start_sunday := mod(8 to_number(to_char(to_date('01APR'||year,'DDMONYYYY'),'D')),7) + 1;
-dbms_output.put_line('start_sunday = ' || start_sunday);

- compute the date of the last Sunday in October for the given year.
end_sunday := 31 to_number(to_char(to_date('31OCT'||year,'DDMONYYYY'),'D')) + 1;
-dbms_output.put_line('end_sunday = ' || end_sunday);

- Compute the actual start dates and times for daylight savings time begin and end
start_dst := to_date(to_char(start_sunday,'00')||'APR'||year||' 02:00:00 AM','DDMONYYYY HH:MI:SS AM');
end_dst := to_date(to_char(end_sunday,'00')||'OCT'||year||' 02:00:00 AM','DDMONYYYY HH:MI:SS AM');

- Check if daylight savings time is in effect
if(check_date >= start_dst and check_date < end_dst) then
return new_time(check_date, 'GMT', 'CDT');
else
return new_time(check_date, 'GMT','CST');
end if;

end convert_gmt;
Title: time GMT
Post by: David on January 01, 1970, 12:00:00 AM
My version is ICS 6.1, under Oracle 8.1.7

Thanks to all of you
Title: time GMT
Post by: David on January 01, 1970, 12:00:00 AM
Hi Jim,

Thanks for your help, I did not expect so much help.....
Just one more question. How could I use your function ? Is it a kind of batch that I have to run every day ?
Title: time GMT
Post by: JimM on January 01, 1970, 12:00:00 AM
When I present the time, I use the function to do the conversion. For example, "select convert_gmt(datesent) from emailin" will convert the times from GMT to your local time. You need to have saved the convert_gmt function to your database.

Right now, I have an "after insert" trigger on the emailin table and save the converted time. That way, when you get emails, the converted time will be saved as soon as the email comes in. You want to be sure to catch all the time fields.