12-09-2009 01:06 PM - edited 03-14-2019 04:58 AM
After searching and not finding any good examples, and the Time and Date steps not being aware of anything other than that which the server sits(Cisco developers...HINT HINT!!! that would be a nice feature), I put this together out of desperation. This is the first time I have ever even thought attempting to write something in Java, so...."Pretty" took a back seat to functional.
However...does anyone have a better way of doing this?
Solved! Go to Solution.
12-10-2009 04:59 AM
I was lazy and didn't bother loading your custom class to look at it. Instead I am sharing a subroutine [subflow] that I built. It is part of a larger application but you can reuse it easily enough.
It will return the current date, time, and day of week. If you pass a timezone it will also perform the proper adjustments - including DST rules - from the server's local time.
A few things to note:
Just to disclaim this up front: This code is provided as-is without warranty. Use at your own risk.
12-10-2009 04:59 AM
I was lazy and didn't bother loading your custom class to look at it. Instead I am sharing a subroutine [subflow] that I built. It is part of a larger application but you can reuse it easily enough.
It will return the current date, time, and day of week. If you pass a timezone it will also perform the proper adjustments - including DST rules - from the server's local time.
A few things to note:
Just to disclaim this up front: This code is provided as-is without warranty. Use at your own risk.
12-10-2009 01:16 PM
Thanks! That helps big time. Helps that I can see something working and not have to build custom classes.
03-22-2016 07:36 AM
I have a small doubt.
Let suppose we have 10 different location configured in UCCX with 10 different time zone. out of 10 site two sites has DLS and UCCX time has one of the 10 time zone.
1.If i configured a script with Time of the Day in local time zone( Not in UCCX time zone). Did this work based on Local time zone or UCCX time zone. if it is not working in UCCX Time zone, what we need to do to work in local time zone.
2.If time zone change due to DLS. How UCCX update time zone for the site.
03-22-2016 08:09 AM
1.If i configured a script with Time of the Day in local time zone( Not in UCCX time zone). Did this work based on Local time zone or UCCX time zone. if it is not working in UCCX Time zone, what we need to do to work in local time zone.
Answer: If you choose TimeZone as TZ[local] for TOD, then the time is taken from the server which is acting as Master. If the TimeZone is set as TZ[primary] then it will always use the Node 1(primary UCCX server) for the time.
2.If time zone change due to DLS. How UCCX update time zone for the site.
Answer: In an ideal situation, you do not need to worry about this on UCCX side since CM will act as a NTP source for CCX and once it has the correct time zone and offset appplied, the same will be rolled down to CCX as well automatically.
Regards
Deepak
03-22-2016 08:38 AM
Thank you Deepak. Could you please clarify below points as well.
1. If site time zone is different from local and primary time zone, How i need to configure Time of the day. For example Master time zone is GMT+1 and primary time zone is GMT+2 and the site time zone is GMT+5. How i need to update in script.
2. I knew if the DLS changes, the Call Manager automatically update phone time zone. But how this will get reflect in Contact center script TOD.
03-22-2016 08:40 AM
You will need to calculate the offset yourself in this scenario and specify the same while configuring TOD in the script then. Taking your example only, if your opening hours are 8:00 AM as per the site TZ then you will need to specify 4:00 AM or 5:00 AM respectively if you choose localTZ or primaryTZ respectively.
Regards
Deepak
03-22-2016 08:58 AM
Thank you deepak, could you please update below question as well.
2. I knew if the DLS changes, the Call Manager automatically update phone time zone. But how this will get reflect in Contact center script TOD.
03-22-2016 09:23 AM
As long as the time on UCCX server is correct post DST change, you do not need to worry about the TOD in scripts. Sometime, you might need to do a Refresh All on the scripts and applications post the DST change if things are not working as expected but that again is not a definite requirement but more of a recommendation.
Regards
Deepak
03-23-2016 04:39 AM
I have seen some option for configuring time zone in script. If i select time zone in Time of Day(TOD) will this works.
03-23-2016 04:47 AM
Why do you think it will not work??
Also what we are discussing from Yesterday is only the TimeZone thing that you need to set while using TOD in the script so not sure why suddenly you have doubts. Configure it yourself and do testing and then come back if you have questions.
Regards
Deepak
03-10-2010 02:48 PM
Thanks for the script! This works perfect for my scenario.
06-03-2010 12:44 PM
How would I go about using the new 'time' that's extracted from the sub_datetime.aef script? I would like to compare it against a time-of-day step (which seems to always reference the server time instead.
My UCCX 7.0(1) is in EST.
I've installed the sub_datetime.aef script and modified the timezone with America/Denver for MST.
In my Main.aef script I've created a subflow step that references sub_datetime.aef and returns String variable currentTime in the format hhmmss.
I have a time-of-day step that's looking for 6AM ~ 6PM to proceed to a CSQ.
Many thanks in advance
06-03-2010 12:48 PM
That data cannot be used within the pre-built steps, including Time of Day. You would need to do a manual evaluation using If steps or other Java logic.
06-03-2010 01:34 PM
Thanks Jonathan,
That's exactly what I needed. I'll setup a couple of IF statements that match against the returned currentTime variable.
Chris
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide