Convert Time Zone (Data Management)

Summary

Converts time values recorded in a date field from one time zone to another time zone.

Converting time values from one time zone to another helps normalize temporal data from different time zones. This improves display and query performance for visualizing temporal data from different time zones using the Time Slider.

Illustration

Convert Time Zone tool illustration
Converts time values recorded in a date field from one time zone to another time zone.

Usage

  • The input time values to be converted must be stored in a date field.

  • The added output time field will be a date type field.

  • If your data was collected in a time zone that observes Daylight Saving Time, you should choose the parameters to honor Daylight Saving Time in the input and output fields.

Parameters

LabelExplanationData Type
Input Table

The input feature class or table that contains the time stamps that will be transformed to a different time zone.

Table View
Input Time Field

The input field that contains the time stamps that will be transformed to a different time zone.

Field
Input Time Zone

The input time zone in which the time stamps were collected.

String
Output Time Field

The output field in which the time stamps transformed to the desired output time zone will be stored.

String
Output Time Zone

The time zone to which the time stamps will be transformed. By default, the output time zone is the same as the input time zone.

String
Input time field values are adjusted for Daylight Saving Time
(Optional)

Specifies whether the time stamps were collected while observing Daylight Saving Time rules in the input time zone. When reading the time values to convert the time zone, the time values will be adjusted to account for the shift in time during Daylight Saving Time.

By default, this option is checked and the input time values are adjusted to account for the shift in time due to the Daylight Saving Time rules observed in the input time zone.

  • Checked—The input time values are adjusted for Daylight Saving Time.
  • Unchecked—The input time values are not adjusted for Daylight Saving Time.
Boolean
Output time field values are adjusted for Daylight Saving Time
(Optional)

Indicates whether the output time values will account for the shift in time due to the Daylight Saving Time rules observed in the output time zone.

By default, this option is checked and the output time values are adjusted to account for the shift in time due to the Daylight Saving Time rules observed in the output time zone.

  • Checked—The output time values are adjusted for Daylight Saving Time in the output time zone.
  • Unchecked—The output time values are not adjusted for Daylight Saving Time in the output time zone.
Boolean

Derived Output

LabelExplanationData Type
Updated Input Table

The updated input table.

Table View

arcpy.management.ConvertTimeZone(in_table, input_time_field, input_time_zone, output_time_field, output_time_zone, {input_dst}, {output_dst})
NameExplanationData Type
in_table

The input feature class or table that contains the time stamps that will be transformed to a different time zone.

Table View
input_time_field

The input field that contains the time stamps that will be transformed to a different time zone.

Field
input_time_zone

The input time zone in which the time stamps were collected.

String
output_time_field

The output field in which the time stamps transformed to the desired output time zone will be stored.

String
output_time_zone

The time zone to which the time stamps will be transformed. By default, the output time zone is the same as the input time zone.

String
input_dst
(Optional)

Specifies whether the time stamps were collected while observing Daylight Saving Time rules in the input time zone. When reading the time values to convert the time zone, the time values will be adjusted to account for the shift in time during Daylight Saving Time.

By default, the input time values are adjusted to account for the shift in time due to the Daylight Saving Time rules in the input time zone.

  • INPUT_ADJUSTED_FOR_DSTThe input time values are adjusted for Daylight Saving Time.
  • INPUT_NOT_ADJUSTED_FOR_DSTThe input time values are not adjusted for Daylight Saving Time.
Boolean
output_dst
(Optional)

Indicates whether the output time values will account for the shift in time due to the Daylight Saving Time rules observed in the output time zone.

By default, the output time values are adjusted to account for the shift in time due to the Daylight Saving Time rules observed in the output time zone.

  • OUTPUT_ADJUSTED_FOR_DSTThe output time values will be adjusted for Daylight Saving Time in the output time zone.
  • OUTPUT_NOT_ADJUSTED_FOR_DSTThe output time values will not be adjusted for Daylight Saving Time in the output time zone.
Boolean

Derived Output

NameExplanationData Type
out_table

The updated input table.

Table View

Code sample

ConvertTimeZone example (Python window)

The following Python window script demonstrates how to use the ConvertTimeZone function in immediate mode.

import arcpy
arcpy.ConvertTimeZone_management("C:/Data/TemporalData.gdb/InputData","Input_Time","Pacific_Standard_Time","Output_Time","Eastern_Standard_Time","INPUT_ADJUSTED_FOR_DST","OUTPUT_ADJUSTED_FOR_DST")
ConvertTimeZone example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the ConvertTimeZone function.

# Name: ConvertTimeZone_Ex02.py
# Description: Convert a time field to another time zone
# Requirements: None

# Import system modules
import arcpy

# Set local variables
inTable = "C:/Data/TemporalData.gdb/InputData"
inputTimeField = "Input_Time"
inputTimeZone = "Pacific_Standard_Time"

outputTimeField = "Output_Time"
onputTimeZone = "Eastern_Standard_Time"
inputUseDaylightSaving = "INPUT_ADJUSTED_FOR_DST"
outputUseDaylightSaving = "OUTPUT_ADJUSTED_FOR_DST"

# Execute CalculateEndDate
arcpy.ConvertTimeZone_management(inTable, inputTimeField, inputTimeZone, outputTimeField, onputTimeZone, inputUseDaylightSaving, outputUseDaylightSaving)

Environments