Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: TimeReference

require(["esri/layers/TimeReference"], function(TimeReference) { /* code goes here */ });

Description

(Added at v2.0)
TimeReference contains read-only information about how the time was captured when the data was created. Defines information about daylight savings time and the time zone in which data was collected. This is the object specification for the timeReference property of the TimeInfo object.

Samples

Search for samples that use this class.

Properties

NameTypeSummary
respectsDaylightSavingBooleanA read-only property that indicates whether the time reference takes into account daylight savings time.
timeZoneStringThe time zone in which the data was captured.
Property Details

<Boolean> respectsDaylightSaving

A read-only property that indicates whether the time reference takes into account daylight savings time. If true, the time values are represented in both the standard time zone and the daylight savings time (when applicable). If false, time values are assumed to be in the standard time zone.
Known values: true | false

<String> timeZone

The time zone in which the data was captured. This property is read-only. For example, data created in the Pacific Time Zone would have the following value for layer.timeInfo.timeReference.timeZone: "Pacific Standard Time".
Sample:
//time-enabled layer mapping hurricane tracks in the Atlantic Ocean
var url = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Hurricanes/MapServer/0";
       
var layer = new FeatureLayer(url);
//Prints "Pacific Standard Time"
console.log(layer.timeInfo.timeReference.timeZone);
Show Modal