Time zone configuration
Insight gives you the ability to define the time zone settings for data sources and Date/Time fields. See "Define Time zone settings" in the Kofax Insight Studio Help for more information.
In this exercise, you will create a record with multiple time fields and learn the process of converting dates to the Insight server time zone.
Insight server and data sources are often located in different time zones. Assume that Adventure Works stores data in the UTC +03:00 time zone. However, some fields are always written in GMT regardless of the database location. Assume that the dbo.SalesOrderHeader table has the following time settings for the fields.
-
The data source time setting for the OrderReceive field is UTC +03:00.
-
The time setting for the PaymentCollected field is GMT.
You need to display these fields in the Insight server time zone. The incremental data renewal must work properly.
To complete this exercise, follow the procedure below.
Create a record with time zone conversion
-
Copy the Adventure Works data source and change the name to Adventure Works Time Zone.
-
In the Property panel, in the Connection group, select the UTC +03:00 Time zone from the list. This time zone will be applied by default to all time fields from this source.
-
In the dbo.SalesOrderHeader table, select the PaymentCollected field and navigate to the Property panel. In the Other group, set Time zone mode to Custom and select the UTC Time zone.
-
Create a new record, name it Time Zone, use the dbo.SalesOrderHeader table as a source for this record.
-
Map the OrderReceive field. When prompted to set the Time Filter based on the OrderReceive field, click No.
-
As the Insight server and the OrderReceive field time zones do not match, you need to edit the time filter, taking the time shift into account. Use the following parameters in the Time filter expression editor to filter data by time.
-
In the Time Zone record, on the Filters tab, in the Time filter section, select the Default Time Filter and click Edit expression.
The Expression editor window appears.
-
In the Expression editor, in the right pane, add the expression as shown in the example below. To add the parameters, you can start typing and select the parameter from the list when prompted.
As a result, the FromDate and ToDate are shifted for this record to account for the time difference between the Insight server and the selected field. This enables you to load the most recent data during the incremental data renewal.
See "Time settings for a DateTime field" in the Kofax Insight Studio Help for more information.
-
-
Map the PaymentCollected field. The field will be converted to the Insight server time zone by default.
-
For a clear demonstration of the difference between time settings, add a new field to the record.
-
In the Record pane, click the Add new field button. Name the field PaymentCollected Not Converted and select the DateTime field type.
-
Map the PaymentCollected field to the PaymentCollected Not Converted field.
-
Select the PaymentCollected Not Converted field, navigate to the Property panel and clear the Convert to server time check box.
-
-
Save the record.
The conversion of time zones occurs only during the data load. -
Use the Test tab to test and view the results. Enter the Date range as in the example below and then click Start.
Compare the set time range, time output under each field name, and time stamp in the query details.
The exact times and dates in your test result may be different from the ones in this example due to your Windows time settings.
After completing this exercise, you are now able to create a record with multiple time fields, define the time zone settings, and convert dates to the Insight server time.