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
orDateTimeOffset
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 aDateTimeOffset
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
Target | Versions |
---|---|
.NET Standard 2.0 | 200.4 - 200.6 |
.NET | 200.4 - 200.6 |
.NET Windows | 200.4 - 200.6 |
.NET Android | 200.4 - 200.6 |
.NET iOS | 200.4 - 200.6 |
.NET Framework | 200.4 - 200.6 |
UWP | 200.4 - 200.6 |