Show / Hide Table of Contents

Property EnableTimestampOffsetSupport

EnableTimestampOffsetSupport

Gets or sets a value indicating whether TimestampOffset fields are supported, which necessarily changes the behavior of Date fields.

Declaration
public static bool EnableTimestampOffsetSupport { get; set; }
Property Value
Type Description
System.Boolean

A value indicating whether TimestampOffset fields are supported, which necessarily changes the behavior of Date fields.

Remarks

ArcGIS Maps SDK historically allowed using either DateTime or DateTimeOffset values for fields of type "Date". To support TimestampOffset fields and avoid ambiguity, the behavior of Date fields has changed to only use DateTime values. This new behavior is now enabled by default, so TimestampOffset fields are supported by default. For more information, see https://links.esri.com/DotNetDateTime.

To disable support for TimestampOffset fields and revert to the previous behavior, set this property to false when initializing the app.

When EnableTimestampOffsetSupport is false:

  • Values of Date attributes are returned as DateTimeOffset (UTC).
  • Values of TimestampOffset attributes are also returned as DateTimeOffset.
  • Either DateTime or DateTimeOffset values can be used when editing Date fields.
  • Editing data with TimestampOffset fields is not supported. A System.NotSupportedException will be thrown.
  • Creating TimestampOffset fields, domains, renderers, or Arcade expressions is not supported.

When EnableTimestampOffsetSupport is true (default):

  • Values of Date attributes are returned as DateTime (UTC). Using a DateTimeOffset for a Date field will cause a "Geodatabase data type mismatch" exception.
  • Values of TimestampOffset attributes are returned as DateTimeOffset.
  • Only DateTime values can be used to edit Date attributes. They are converted to UTC.
  • DateTimeOffset values can be used to edit TimestampOffset fields.
  • Creating TimestampOffset fields, domains, renderers, and Arcade expressions is supported.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.4 - 200.8
.NET200.4 - 200.8
.NET Windows200.4 - 200.8
.NET Android200.4 - 200.8
.NET iOS200.4 - 200.8
.NET Framework200.4 - 200.8
UWP200.4 - 200.8
In This Article
Back to top Copyright © 2022 Esri.