cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
13755
Views
19
Helpful
18
Replies

UCCX and Time Zones

jmorlan
Level 1
Level 1

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?

1 Accepted Solution

Accepted Solutions

Jonathan Schulenberg
Hall of Fame
Hall of Fame

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:

  • JRE must be properly patched for the DST offset to be accurate. You can't apply JRE patches other than through CCX patches so you may need to patch your system.
  • The values returned are not parsed into Date- and Time-type variables. The date is returned as a literal string. The time is returned as both a String and an integer. The day of week is returned as an integer.
  • The timezone must be in a zoneinfo format. E.g. "America/Chicago"
  • This will only work with an Enhanced or Advanced CCX license or an IP IVR license.
  • This was written for CCX 7.0(1). Your ability to open it in lower version editors may vary, especially below 5.0.

Just to disclaim this up front: This code is provided as-is without warranty. Use at your own risk.

View solution in original post

18 Replies 18

Jonathan Schulenberg
Hall of Fame
Hall of Fame

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:

  • JRE must be properly patched for the DST offset to be accurate. You can't apply JRE patches other than through CCX patches so you may need to patch your system.
  • The values returned are not parsed into Date- and Time-type variables. The date is returned as a literal string. The time is returned as both a String and an integer. The day of week is returned as an integer.
  • The timezone must be in a zoneinfo format. E.g. "America/Chicago"
  • This will only work with an Enhanced or Advanced CCX license or an IP IVR license.
  • This was written for CCX 7.0(1). Your ability to open it in lower version editors may vary, especially below 5.0.

Just to disclaim this up front: This code is provided as-is without warranty. Use at your own risk.

Thanks!  That helps big time.  Helps that I can see something working and not have to build custom classes.

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.

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

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.

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

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.

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

I have seen some option for configuring time zone in script. If i select time zone in Time of Day(TOD) will this works.

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

Thanks for the script!  This works perfect for my scenario.

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

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.

Thanks Jonathan,

That's exactly what I needed.  I'll setup a couple of IF statements that match against the returned currentTime variable.

Chris