How do I use time zone?
In Orbita, Time Zone lets the Voice assistant identify when to invoke tasks/actions. Time zone is used in Calendar events, tasks, etc.
When an admin creates a user account, the system will assign the time zone as āUS/EASTERNā by default.
The system converts the time to UTC (Universal Time Coordinated) and stores it. This time will be adjusted according to the userās time zone and will be displayed to the user.
How to change the time zone as a user?
Users can change their time zone.
Login to Experience manager.
Click the down arrow next to the Userās name.
Select Settings from the drop-down.
In the Info tab, scroll down to Time Zone and change it.
Click Save.
How is the time zone used in the Experience Designer?
Consider the example flow where the user will get a greeting message based on their time zone.
User manager node. Used to get the user profile information.
Function node.
You can write a custom code based on your business requirements. In this example, the following code gets the userās time zone and greets the user based on the time of the day.
Example code
var tz = global.get("momentTimezone"); var moment = global.get("moment"); var userTimezone = msg.data.userData.users[0].personaProfile.timezone; var adjustedTime = tz.tz(moment(), userTimezone).format("H"); var message; if (adjustedTime < 12 ) { Ā Ā Ā message = "Good Morning"; } else if(adjustedTime < 15) { Ā Ā Ā message = "Good Afternoon" } else { Ā Ā Ā message = "Good Evening" } msg.payload.message = message; return msg;
Say node.
A say node contains a message that is read out or shown, by the voice assistant or smart display.
Example code
{{msg.payload.message}}