Notifications

71 views

Description


Customer's may notice that the data specified on a scheduled data import is not showing the expected date or time range after import.  For example after importing a spreadsheet containing date and time values, it is noticed that the resulting data is off by several hours from what is displayed on the spreadsheet source of the data.  This issue is normally caused by timezone transformations that are performed on that data at the time of import.

Timezone data changes after import

When the data is imported through a scheduled import job, it runs in the context of the user whose name is populated in the Run as field on the Scheduled Import job form.  If that user has no timezone value associated to his account (in that user's User record) the system will use the default system timezone as configured in the System Property glide.sys.default.tz.  If the Scheduled Import Job record has no run-as user set, it will use the User record in the system with the name "guest".

Resolution and Procedure


There are a number of ways in which this issue can be resolved, including changing the Run As user associated to the Scheduled Import Job to be an individual who is in the same timezone as the data as stored on the data source, however the recommend method in this case is to change the actual timezone as associated to the Scheduled Data Import record.  The Run As Timezone field is not, by default, displayed on the Scheduled Data Import form, thus the administrator will probably want to first display this field on the form.  The following steps can be used to allow tis field to be shown on the form:

Log into the instance with an account having admin rights to the instance.

Open the Scheduled Data Import Job record (found in the scheduled_import_set table) for the Scheduled Import that is importing with incorrect date and time values.

Click the contextual menu at the upper left corner of the record (commonly known as the Hamburger Menu).

From the pop-up menu that appears, select the option titled Configure.

From the secondary pop-up menu that appears, select Form Layout.

A slushbucket control should appear with fields on the right which are currently found on the form and all other fields from the table which is used to generate the form on the left.

In the list of fields in the list with the label Available, locate the field with the name Run as tz and double click that field name to move the field to the Selected list.  Use the up and down arrows to position the field as wanted on the form.  If this field is already found in the list of Selected fields, then no action is needed to have that field display.

Adding the Run as tz field

Once the field is added to the Selected list of fields and positioned as necessary, click the Save button to return to the record form.

Locate the Run as tz field on the form and change it to be the same time zone as that of the data on the import source (such as US/Pacific).

 Changing the run as timezone

Click the Update button on the Scheduled Data Import record.

After updating this timezone as necessary, if the Run as tz field should not normally be displayed on the form, the field can be removed from display using the Configure menu and selecting Form Layout.

The next scheduled data import using this record should then associate the date and time fields imported with the timezone as specified in the Run as tz field.

Correct alignment of values

Additional Information


See the following ServiceNow Docs site article which briefly describes changing the Time Zone as associated for a scheduled import:

https://docs.servicenow.com/bundle/london-platform-administration/page/administer/time/task/t_ChangeTimeZoneInScheduledImport.html

Article Information

Last Updated:2019-01-02 03:09:38
Published:2018-12-27