System.DateTimeOffset.LocalDateTime Property

Gets a DateTime value that represents the local date and time of the current DateTimeOffset object.

Syntax

public DateTime LocalDateTime { get; }

Value

Documentation for this section has not yet been entered.

Remarks

If necessary, the DateTimeOffset.LocalDateTime property converts the current DateTimeOffset object's date and time to the local system's date and time. The conversion is a two-step operation:

[The 'ordered' type of list has not been implemented in the ECMA stylesheet.]

There are no invalid times and ambiguous times are mapped to the local zone's standard time. (However, the conversion can create an anomaly: if a DateTimeOffset value that is derived from the local computer reflects an ambiguous date and time, that value can be converted to UTC and then back to a local time that differs from the original time.) The property applies any adjustment rules in the local time zone when it performs this conversion.

This property returns both the date and the time component of a DateTimeOffset object, which makes it useful for DateTimeOffset to DateTime conversion. In addition to performing any necessary time conversion, this property differs from the DateTimeOffset.DateTime property by setting the value of the DateTime.Kind property of the returned DateTime object to DateTimeKind.Local.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0