<< Click to Display Table of Contents >> Perform timezone operations |
In many business scenarios, accurate date-time comparisons and calculations are essential—especially when working across multiple time zones. This section introduces key Bizagi functions that help you manage time zone operations effectively.
When using these functions, keep in mind that each user's time zone is determined by the hierarchy defined in your Bizagi project. For more details, refer to the Managing time zones documentation.
If you need to review or update time zones for multiple users simultaneously, consider grouping users by Location. This approach ensures that all users within a location inherit the same time zone, allowing for consistent and streamlined date-time calculations across your processes.
•Convert user time to server time zone
•Convert server time to a specified time zone
•Convert server time to users time zone
•Convert a specified time zone to server time
•Get offset for specified location
•Get offset for working time zone
To illustrate how to perform date operations let's take the following example: A Office Supply Request Process manages the necessary activities to request and approve office supplies. When an employee creates a request, he/she must enter the Request date and the Quotation date of each quotation.
In this example, we will use date operations in order to:
•Assigns today's date to the request date (RequestDate attribute).
•Set the duration of Activities.
•Verify that the Products receive date is greater than the Request date. If not, display a validation message.
The data model of the Process is as follows:
Converts a date-time value that is relative to a user's time zone into the servers time zone.
To convert the Request Date attribute to the server time zone, go to the fourth step of the Bizagi Process Wizard and select Activity Actions.
Click the Task in which this action will be performed and create an Expression.
Add an expression module and select the attribute to which today's date will be assigned.
Use the Data Model option to navigate the Data Model.
The expression would be as follows:
ConvertUserTimetoServerTime(int idUser, DateTime userTime);
Click OK to save the changes.
Converts a date in server time (UTC+0) to the equivalent date in the specified time zone.
To convert the Request Date attribute to the specified time zone, go to the fourth step of the Bizagi Process Wizard and select Activity Actions.
Click the Task in which this action will be performed and create an Expression.
Add an expression module and select the attribute to which today's date will be assigned.
Use the Data Model option to navigate the Data Model.
The expression would be as follows:
ConvertServerTimeToTimeZoneTime(string sTimeZoneName, DateTime serverTime);
Click OK to save the changes.
Converts a date-time value from a specified time zone to server time (UTC+0).
To convert the Request Date attribute to the specified time zone, go to the fourth step of the Bizagi Process Wizard and select Activity Actions.
Click the Task in which this action will be performed and create an Expression.
Add an expression module and select the attribute to which today's date will be assigned.
Use the Data Model option to navigate the Data Model.
The expression would be as follows:
ConvertServerTimetoUserTime(int idUser, DateTime serverTime);
Click OK to save the changes.
Converts a date-time value from a specified time zone to server time (UTC+0).
To convert the Request Date attribute to the specified time zone, go to the fourth step of the Bizagi Process Wizard and select Activity Actions.
Click the Task in which this action will be performed and create an Expression.
Add an expression module and select the attribute to which today's date will be assigned.
Use the Data Model option to navigate the Data Model.
The expression would be as follows:
ConvertTimeZoneTimeToServerTime(string sTimeZoneName, DateTime timeZoneTime);
Click OK to save the changes.
Returns the difference in minutes between a location’s time zone and the server time (UTC+0).
To convert the Request Date attribute to the specified time zone, go to the fourth step of the Bizagi Process Wizard and select Activity Actions.
Click the Task in which this action will be performed and create an Expression.
Add an expression module and select the attribute to which today's date will be assigned.
Use the Data Model option to navigate the Data Model.
The expression would be as follows:
GetOffsetForLocation(int idLocation);
Click OK to save the changes.
Returns the difference in minutes between an organization’s time zone and the server time (UTC+0).
To convert the Request Date attribute to the specified time zone, go to the fourth step of the Bizagi Process Wizard and select Activity Actions.
Click the Task in which this action will be performed and create an Expression.
Add an expression module and select the attribute to which today's date will be assigned.
Use the Data Model option to navigate the Data Model.
The expression would be as follows:
GetOffsetForOrganization(int idOrg);
Click OK to save the changes.
Returns the difference in minutes between a specific user's defined time zone and the server time (UTC+0).
To convert the Request Date attribute to the specified time zone, go to the fourth step of the Bizagi Process Wizard and select Activity Actions.
Click the Task in which this action will be performed and create an Expression.
Add an expression module and select the attribute to which today's date will be assigned.
Use the Data Model option to navigate the Data Model.
The expression would be as follows:
GetOffsetForUser(int idUser);
Click OK to save the changes.
Returns the difference in minutes between the time zone defined in the WorkingTimeZone key and the server time (UTC+0).
To convert the Request Date attribute to the specified time zone, go to the fourth step of the Bizagi Process Wizard and select Activity Actions.
Click the Task in which this action will be performed and create an Expression.
Add an expression module and select the attribute to which today's date will be assigned.
Use the Data Model option to navigate the Data Model.
The expression would be as follows:
GetOffsetForWorkingTimeZone();
Click OK to save the changes.
Last Updated 7/2/2025 11:59:37 AM