Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Determines the serialization mode of DateTime objects.
<configuration>
<dateTimeSerialization>
<dateTimeSerialization
mode = "Roundtrip|Local"
/>
The following sections describe attributes, child elements, and parent elements.
Attributes | Description |
---|---|
mode |
Optional. Specifies the serialization mode. Set to one of the DateTimeSerializationSection.DateTimeSerializationMode values. The default is RoundTrip. |
None.
Element | Description |
---|---|
system.xml.serialization | The top-level element for controlling XML serialization. |
When this property is set to Local, DateTime objects are always formatted as the local time. That is, local time zone information is always included with the serialized data.
When this property is set to Roundtrip, DateTime objects are examined to determine whether they are in the local, UTC, or an unspecified time zone. The DateTime objects are then serialized in such a way that this information is preserved. This is the default behavior and is the recommended behavior for all new applications that do not communicate with older versions of the framework.
.NET feedback
.NET is an open source project. Select a link to provide feedback: