How To Display Or Work With User Local Date And Time In Oracle Digital Assistant Using The Oracle Web SDK by Frank Nimphius


Oracle Digital Assistant lives in the cloud where it uses universal time (UTC) for all date operations. Dependent on where you live in this world, the timezone offset of your local time compared to UTC varies. For Germany, where I am based in, the timezone offset is 2 hours that Germany is ahead of UTC (or 7200000 ms).

UTC is a common date and time reference used in many applications and software products. However, the user local time is often needed, for example if there are deadlines like opening hours to enforce and check. This article explains how you can obtain the local time in Oracle Digital Assistant using the Oracle Web SDK.

Oracle Digital Assistant chatbots (digital assistants) communicate with users through a conversation channel that is connected to a messenger on the user device. Because Oracle Digital Assistant does not have direct access to the user device, it cannot query the user local time. This means that the local time information needs to be passed by the messenger as part of an initial message sent to the digital assistant. 3rd party messengers like Facebook send the timezoneOffset information that then becomes accessible in Oracle Digital Assistant through the ${profile.timezoneOffset} expression in BotML.

The image below shows what gets printed when you run the Oracle Web channel (Oracle Web SDK) and print the Oracle Digital Assistant cloud tie, the timezoneOffset and the calculated local time. As you can see, the timezoneOffset is not available and thus the local time calculated in the sample is the same as the UTC time. Read the complete article here.

Developer Partner Community

For regular information become a member in the Developer Partner Community please register here.

clip_image003 Blog clip_image005 Twitter clip_image004 LinkedIn image[7][2][2][2] Facebook image Meetups

Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.