[the quote is from the movie "The Whole Nine Yards" - "Do the Math", but along with the Big Chill it is one of my favorites]
O.K. - Assume 2 call centers, in two time zones. Dialer uses retry counts and next retry timestamps. ANI's (phone numbers) are loaded and separated by 'project types'. Lists are presented to agents by project.
The kicker is that the last call is saved as EST in one database, while the retries and next time are in another database and next time is stored as GMT.
I know there are registry keys and COM stuff to aid in this, but there is already significant overhead with ODBC drivers between MySQL, Access and SQL Server.
MySQL stores datetimes as numeric with n decimals
So....
2 simple lists (for EST Time) and calculate current day and next day
t1=TimeYmdHms()
t1=TimeDiffDays(t1,"1899:12:30:00:00:00")
t2=t1+1
hrs="8AM,9AM,10AM,11AM,Noon,1PM,2PM,3PM,4PM,5PM,6PM,7PM,8PM,9PM,10PM,11PM"
thrs="0.334,0.375,0.417,0.459,0.500,0.542,0.584,0.626,0.667,0.709,0.751,0.792,0.834,0.876,0.917,0.959"
hr1=0.0417
Being only concerned with a rounded hour, with hr1 being a 1 hour time frame
Script presents a dropdown of hours, representing an 'As of this hour...' so assuming 2pm is selected, t1 is added to the thrs corresponding to 2pm to get the EST hour. This permits a query into the calling tables to see which projects are active as of that hour.
The ANI lists are in separate tables, not a master table, so for each project returned in the above query want to see the retries available in the next n*hr1 hours within the current day.
To aid in the calculation of the GMT times, ini entry for the bias which can be adjusted for Daylight Savings:
bias = IniReadPvt("Main","bias","0.2083",cINI)
At which point t2 becomes t1+bias
So let's make this more clear: today March 1 is
42064.000 (carried to 3 decimals)
and 42064.417 would be 10am (which would be t1)
and then adding the bias to the GMT time > t1+2*hr1 hours and less than t2 (next day)
would give a count of the ANI's that can be retried starting in 2 hours [EST].
Doesn't quite seem to be working as planned.... Right now more of a math test.