---
sourceDocument: Australia Employee Service Management
sourceDocumentLink: https://www.servicenow.com/docs/r/pt-BR/employee-service-management

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia Employee Service Management

ft:clusterId :

    - emplsm

bundleId :

    - emplsm

workflow :

    - Employee


---

# Configure the time zone setting for badge and daily log data

# Configure the time zone setting for badge and daily log data {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 min. de leitura

Add a script include in the Global scope to calculate the date and time from the badge swipe data considering the affected user's time zone.
Add a script include in the Global scope to consider the affected user's time zone when you run a diagnostic request using the badge reader or user daily log data source.

## Antes de Iniciar

Role required: admin

## Procedimento

1. Navigate to AllSystem UIScript Includes.
2. Click New.
3. In the Name field, enter <kbd class="ph userinput">TimeZoneUtils</kbd>.
4. From the Accessible from list, select All application scopes.
5. Copy the following script into the Script field.  

       var TimeZoneUtils = Class.create();
       TimeZoneUtils.prototype = {
       	initialize: function() {
       	},
       	getTimeZone: function(timeZoneString) {
       		return Packages.java.util.TimeZone.getTimeZone(timeZoneString);
       	},
       	getTimeZoneOffSet: function(timeZoneString, gdt) {
       		var timeZoneObj = this.getTimeZone(timeZoneString);
       		var dateTime = new GlideDateTime();
       		if (gdt) {
       			dateTime.setValue(gdt);
       		}
       		dateTime.setTZ(timeZoneObj);
       		return dateTime.getTZOffset();
       	},
       	getBoundaryDates: function(timeZoneString, offset, dateTime) {
       		var tz = this.getTimeZone(timeZoneString);
       		var gd = new GlideDateTime();
       		gd.setValue(dateTime);
       		gd.add(offset);
       		var startTime = '00:00:00';
       		var endTime = '23:59:59';
       		var actualDate = new GlideDate();
       		actualDate.setValue(gd.getValue());		
       		var startDateTime = new GlideDateTime();
       		startDateTime.setTZ(tz);
       		startDateTime.setDisplayValueInternal(actualDate + ' ' + startTime);
       		var endDateTime = new GlideDateTime();
       		endDateTime.setTZ(tz);
       		endDateTime.setDisplayValueInternal(actualDate + ' ' + endTime);
       		return {
       			startDateTime: startDateTime,
       			endDateTime: endDateTime
       		};
       	},
       	type: 'TimeZoneUtils'
       };

6. Click Submit.

## Resultado

The script is used when you run the diagnostic request using the badge reader or user daily log data source. These data sources identify the potentially exposed users who might have come in contact with an affected user. The script considers the affected user's time zone while calculating the date and time from the badge swipe data or daily log data.

