Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
<dateTimeSerialization> Element
[Note: This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Determines the serialization mode of DateTime objects.

<configuration> Element
  <dateTimeSerialization> Element
<dateTimeSerialization
    mode = "Roundtrip" | "Local"
/>

The following sections describe attributes, child elements, and parent elements.

Attributes

Attributes

Description

mode

Optional. Specifies the serialization mode. Set to one of the DateTimeSerializationMode values. The default is RoundTrip.

Child Elements

None.

Parent Elements

Element

Description

system.xml.serialization

The top-level element for controlling XML serialization.

In versions 1.0, 1.1, 2.0 and later versions of the .NET Framework, 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. Set this property to Local to ensure compatibility with older versions of the .NET Framework.

In version 2.0 and later versions of the .NET Framework that have this property 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.

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker