ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Convert Time Zone

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

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.

Learn more about setting a temporal reference on your temporal data

Learn more about visualizing temporal data using the Time Slider

Illustration

Convert Time Zone illustration
In the illustration, the time values in the Input_Time field collected in Pacific time zone [(GMT-08:00) Pacific Time (US & Canada)] are converted into time values in Eastern time zone [(GMT-05:00) Eastern Time (US & Canada)] and stored in the Output_Time field.

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 which observes Daylight Saving, then you should choose the parameters to honor Daylight Saving time in the input and output fields. Learn more about Daylight Saving Time.

Syntax

ConvertTimeZone_management (in_table, input_time_field, input_time_zone, output_time_field, output_time_zone, {input_dst}, {output_dst})
ParameterExplanationData Type
in_table

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

Table View
input_time_field

The input field that contains the time stamps which 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)

Indicates 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_DST —The input time values are adjusted for Daylight Saving Time.
  • INPUT_NOT_ADJUSTED_FOR_DST —The 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_DST —The output time values will be adjusted for Daylight Saving Time in the out time zone.
  • OUTPUT_NOT_ADJUSTED_FOR_DST —The output time values will not be adjusted for Daylight Saving Time in the out time zone.
Boolean

Code sample

ConvertTimeZone example (Python window)

The following Python window script demonstrates how to use the ConvertTimeZone tool 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 (stand-alone script)

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

# 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

This tool does not use any geoprocessing environments

Licensing information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Fields toolset

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal