cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
139
Views
0
Helpful
0
Comments
cdnadmin
Community Member
This document was generated from CDN thread

Created by: Audra Galiano on 12-05-2011 03:17:41 PM
I am looking for an easy way to manipulate time zone, and have been investigating using a java class.
 
Is there any recommendations for dealing with 3 time zones for open/close other than a class?
Trying to keep it simple for a customer auto attendent.

Subject: RE: New Message from Audra Galiano in Customer Voice Portal (CVP) - CVP - A
Replied by: Hemal Mehta on 12-05-2011 03:25:25 PM
You can use a class or javascript. However for javascript, you would have to embed in vxml code.  Java class would be the best way. Shouldn¿t be difficult. Also if you are using ICM, you could put this check in ICM also.
Hemal

From: Cisco Developer Community Forums [mailto:[email protected]]
Sent: Thursday, May 12, 2011 2:18 PM
To: [email protected]
Subject: New Message from Audra Galiano in Customer Voice Portal (CVP) - CVP - All Versions: Time Zone Class

Audra Galiano has created a new message in the forum "CVP - All Versions":

--------------------------------------------------------------
I am looking for an easy way to manipulate time zone, and have been investigating using a java class.

Is there any recommendations for dealing with 3 time zones for open/close other than a class?
Trying to keep it simple for a customer auto attendent.
--
To respond to this post, please click the following link:

<http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/3874386>

or simply reply to this email.

Subject: RE: Time Zone Class
Replied by: Audra Galiano on 12-05-2011 03:51:03 PM
Are there any particular versions of Java classes I need to be cautious of?
I found a class I can install but wanted to confirm it working with Studio 8.

BTW, thanks, this is a standalone app, no ICM integration.

Subject: RE: Time Zone Class
Replied by: Hemal Mehta on 12-05-2011 04:06:12 PM
Are there any particular versions of Java classes I need to be cautious of?
I found a class I can install but wanted to confirm it working with Studio 8.

BTW, thanks, this is a standalone app, no ICM integration.


In Studio 8, you just need to write a class that works with JRE that your are using to compile  in your Studio, you can use 1,4, 1.5, 1.6.
1.6 would be the best option.

Subject: RE: Time Zone Class
Replied by: Audra Galiano on 23-05-2011 11:34:52 AM
I need some quick help on this.
I need to do this without a java class.

So I am trying to manipulate current time, hour.

Is this the right way to do this in a math element?


int({GeneralDateTime.HourOfDay.CURRENT})+1

Subject: Re: New Message from Audra Galiano in Customer Voice Portal (CVP) - CVP - A
Replied by: Janine Graves on 23-05-2011 12:57:39 PM
You could omit the int portion, the Math element always stores the
result as a Long.
{GeneralDateTime.HourOfDay.CURRENT}+1

Just be careful:
If the time is 11pm, the hour comes back as 23, when you add 1 it'll be 24.0
If the time is midnight, the hour comes back as 0, when you add 1 it'll
be 1.0

Also, do both of your time zones handle Daylight Savings Time the same way?

Janine



On 5/23/2011 11:34 AM, Cisco Developer Community Forums wrote:
> Audra Galiano has created a new message in the forum "CVP - All Versions":
>
> --------------------------------------------------------------
> I need some quick help on this.
> I need to do this without a java class.
>
> So I am trying to manipulate current time, hour.
>
> Is this the right way to do this in a math element?
>
>
> int({GeneralDateTime.HourOfDay.CURRENT})+1
> --
> To respond to this post, please click the following link:
>
> <http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/3930906>
>
> or simply reply to this email.

--
Janine Graves

Subject: RE: Time Zone Class
Replied by: Audra Galiano on 02-06-2011 09:44:09 AM
Janine,
Regarding the midnight problem on Server Hour, I need to confirm this expression will work in the standard math element.
I am adjusting 1 hour back from the server time for DST.

if({GeneralDateTime.HourOfDay.CURRENT}>1,{GeneralDateTime.HourofDay.CURRENT}-1,{GeneralDateTime.HourofDay.CURRENT}+23)

Subject: Re: New Message from Audra Galiano in Customer Voice Portal (CVP) - CVP - A
Replied by: Janine Graves on 02-06-2011 10:29:09 AM
Hi Audra

Here's the statement you can use in your math element to effectively
subtract 1 from the hour, but keep the answer between 0-23:      
({GeneralDateTime.HourOfDay.CURRENT} +23 ) % 24

Adding 23 is the same as subtracting 1 when working with a 24-hour
clock. And the %24  tak3w the remainder MOD 24, so the answer is always
between 0 and 23 - which is what you want.

I just tested this out on a few different HoursOfDay and got the
following for currentHour and the associated value after running it
through the math'l expression above:
0 --> 23  (midnight  --> 11pm)
1 --> 0   (1am --> midnight)
13 --> 12 (1pm becomes noon)

Regards, Janine
www.TrainingTheExperts.com



On 6/2/2011 9:44 AM, Cisco Developer Community Forums wrote:
> Audra Galiano has created a new message in the forum "CVP - All Versions":
>
> --------------------------------------------------------------
> Janine,
> Regarding the midnight problem on Server Hour, I need to confirm this
> expression will work in the standard math element.
> I am adjusting 1 hour back from the server time for DST.
>
> if({GeneralDateTime.HourOfDay.CURRENT}>1,{GeneralDateTime.HourofDay.CURRENT}-1,{GeneralDateTime.HourofDay.CURRENT}+23)
> --
> To respond to this post, please click the following link:
>
> <http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/3993017>
>
> or simply reply to this email.

--
Janine Graves
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links