Allister Purves | Hi, I had the same problem and the only solution I found was to code around it. I removed the $timeoffset from the xml definition and the parameter list in the stored procedure. Below is a test stored procedure that returns the offset to UTC in seconds as an integer. It's probably not the most elegant solution and someone may come up with a simpler way of doing it but it works :-) DROP FUNCTION sp_test(); CREATE FUNCTION "uccxhruser".sp_test() RETURNING INT AS Start_Time; DEFINE l_eStartDate, l_eEndDate DATETIME YEAR TO FRACTION(3); DEFINE l_eInterval INTERVAL SECOND(5) TO SECOND; -- This is a large enough for the greatest offset (13 hours = 46800 seconds) DEFINE l_iInterval INT; LET l_eEndDate = DBINFO('utc_to_datetime',0); -- In my case this returns '1970-01-01 10:00:00' as I am 10 hours ahead of UTC LET l_eStartDate = '1970-01-01 00:00:00'; --UTC time LET l_eInterval = l_eEndDate-l_eStartDate; --Gives the interval LET l_iInterval = l_eInterval::Char(20)::INT; -- Converts to an integer which can then be used in the stored procedure in place of p_offset (variable used in the IVR Traffic Analysis Report) RETURN l_iInterval; END FUNCTION; Hope this helps Allister |
| Please sign in to flag this as inappropriate. |